-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: store id_hash_keys
in Document
objects to make documents clonable
#3697
Conversation
id_hash_keys
in Document
objectsid_hash_keys
in Document
objects to make documents clonable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments, mostly regarding doc strings. Also, I think we should follow our deprecation policy here, even though this is a minor change.
Co-authored-by: bogdankostic <bogdankostic@web.de>
Co-authored-by: bogdankostic <bogdankostic@web.de>
…nto clonable-documents
I'm not sure how to proceed here. This PR is mostly about persisting a parameter that has always been given to the Document. We could argue I'm adding stuff rather than removing it. Where can I add the deprecation notice? Do you have a specific API in mind? |
I thought of adding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Related Issues
PreProcessor
#3557Proposed Changes:
Document
object store theirid_hash_key
attribute after initialization. This allows nodes to "clone" the way Documents were created, for example when splitting or merging them together, and saves the user the burden to keep specifying theid_hash_key
parameter every time.id_hash_keys
Document
classDocument
class, mainly thefield_map
s.How did you test it?
Notes for the reviewer
Read the related discussions linked above as they contain valuable insights about why this feature was initially dismissed.
Note also that the possibility to pass an ID to the init of Document might have been an early workaround to the fact that
id_hash_keys
was lost. We might want to reconsider this feature later on.Checklist