-
Notifications
You must be signed in to change notification settings - Fork 2k
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: Add batching for querying in ElasticsearchDocumentStore
and OpenSearchDocumentStore
#5063
Merged
Merged
Changes from 5 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
415fb14
Include benchmark config in output
bogdankostic f0b54bf
Use queries from aggregated labels
bogdankostic 477460e
Merge branch 'benchmark_configs' into doc_store_batching
bogdankostic 6f1bc31
Introduce batching for querying in ElasticsearchDocStore and OpenSear…
bogdankostic 1ddf2a5
Merge branch 'main' into doc_store_batching
bogdankostic e5536aa
Fix mypy
bogdankostic e485ef7
Use self.batch_size in write_documents
bogdankostic 90056f9
Use 10_000 as default batch size
bogdankostic 0122240
Add unit tests for write documents
bogdankostic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
write_documents
method of theOpenSearchDocumentStore
also has abatch_size
parameter with a default of 10_000. If we introduce a batch_size param in the init of the document store, we should also useself.batch_size or batch_size
inwrite_documents
and make the parameterbatch_size: Optional[int] = None
in the signature of thewrite_documents
method of theOpenSearchDocumentStore
.Can we make the default 10_000 instead of 1_000 then to prevent a breaking change?
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.
I fixed
write_documents
and changed the default back to 10_000. I initially changed it to 1000 because I found this on the Elasticsearch documentation, but this information is probably outdated as it is for a former version.