-
Notifications
You must be signed in to change notification settings - Fork 86
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
Add multiple searches #714
Conversation
Co-authored-by: Paul Sanders <psanders1@gmail.com>
Co-authored-by: Paul Sanders <psanders1@gmail.com>
@@ -0,0 +1,33 @@ | |||
import pytest | |||
|
|||
from meilisearch.errors import MeiliSearchApiError |
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.
FYI, the black
error is because there should be 2 line breaks here, the isort
error is unrelated to this PR. I'm going to do a separate PR now to fix it.
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.
Thank you so much!
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!
Co-authored-by: Bruno Casali <brunoocasali@gmail.com>
Co-authored-by: Bruno Casali <brunoocasali@gmail.com>
709: Changes related to the next Meilisearch release (v1.1.0) r=bidoubiwa a=meili-bot Related to this issue: meilisearch/integration-guides#251 This PR: - gathers the changes related to the next Meilisearch release (v1.1.0) so that this package is ready when the official release is out. - should pass the tests against the [latest pre-release of Meilisearch](https://github.com/meilisearch/meilisearch/releases). - might eventually contain test failures until the Meilisearch v1.1.0 is out.⚠️ This PR should NOT be merged until the next release of Meilisearch (v1.1.0) is out. _This PR is auto-generated for the [pre-release week](https://github.com/meilisearch/integration-guides/blob/main/resources/pre-release-week.md) purpose._ Done: - #714 - #716 726: Update version for the next release (v0.26.0) r=bidoubiwa a=meili-bot This version makes this package compatible with Meilisearch v1.1 🎉 Check out the changelog of [Meilisearch v1.1](https://github.com/meilisearch/meilisearch/releases/tag/v1.1.0) for more information on the changes. ##⚠️ Breaking changes * Change error names from MeiliSerach to Meilisearch (#720) `@sanders41` ## 🚀 Enhancements - Add the ability to provide a specific `csv-delimiter` when adding and updating documents in CSV format (#716) `@alallema` - New method `client.multi_search()` provides the possibility to make multiple requests at once (#714) `@alallema` Example: ```python client.multi_search( [ {'indexUid': 'movies', 'q': 'pooh', 'limit': 5}, {'indexUid': 'movies', 'q': 'nemo', 'limit': 5}, {'indexUid': 'movie_ratings', 'q': 'us'} ] ) ``` Thanks again to `@alallema` and `@sanders41!` 🎉 Co-authored-by: meili-bot <74670311+meili-bot@users.noreply.github.com> Co-authored-by: alallema <amelie@meilisearch.com> Co-authored-by: Amélie <alallema@users.noreply.github.com>
Now Meilisearch can perform multiple searches in one single HTTP request.
A new method has been added as specifications:
multi_search(self, queries: Dict[str, Any]) -> Dict[str, Any]
It's take a
List
as:[{"indexUid": "indexA", "q": ""}, {"indexUid": "indexB", "q": ""}]
SDK requirements: meilisearch/integration-guides#251