-
Notifications
You must be signed in to change notification settings - Fork 5
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
Pass document by reference. #11
Conversation
Thanks for the PR! This looks good. Not sure why I passed documents by value in the first place when creating this. Before merging:
|
Sure @marcus-pousette, those are fixed now 👍 |
Technically this is a breaking change, do you want to bump the major version, maybe Also, I think a better API for |
A major version bump sounds good. Especially if we could have the improvements in the Filter and Tokenizer as you mentioned. I think the updates you mentioned sound great! Additional things:
If you are motivated to make the Tokenizer, and Filter update, feel free to include those in this PR or in another PR |
Thanks @marcus-pousette, lets see if we can get the |
@marcus-pousette, I think this is good now, please review 👍 The benchmarks show a little performance improvement 😁 |
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.
The changes you have done look good.
I included some suggestions for additional improvements that are now possible because of your changes, if you like to apply them (for even more performance gains) feel free to :). Otherwise I will merge this!
Good catch @marcus-pousette , I have updated with those changes 👍 |
Well done! Thanks 👍 |
I think it makes more sense to pass a reference to the document when adding to the index as it is only a reference that is passed to the extraction function for each field.
Also I have a use case where I need to store the original documents and this prevents an unnecessary clone when adding to the index.
Thanks 🙏