Skip to content
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

Perform multiple searches in one single HTTP request #591

Closed
3 tasks
brunoocasali opened this issue Apr 27, 2023 · 1 comment · Fixed by #652
Closed
3 tasks

Perform multiple searches in one single HTTP request #591

brunoocasali opened this issue Apr 27, 2023 · 1 comment · Fixed by #652
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@brunoocasali
Copy link
Member

brunoocasali commented Apr 27, 2023

⚠️ This issue is generated, it means the examples and the namings do not necessarily correspond to the language of this repository.
Also, if you are a maintainer, feel free to add any clarification and instruction about this issue.

Sorry if this is already partially/completely implemented, feel free to let me know about the state of this issue in the repo.

Related to meilisearch/integration-guides#251


Related to:

Create a new client method called multiSearch/multi_search, which will request POST /multi-search with a body payload containing a structure similar to this:

{
   "queries": [ 
      { "indexUid": "movie", "q": "wonder", "limit": 10 }, 
      { "indexUid": "books", "q": "king", "page": 2 } 
    ]
}

Each object is a simple search object sent in the POST /indexes/:indexUid/search request.

Pay attention to the response, which will follow the order of the requests object and will look like this (note the new indexUid key in the response):

{
   "results": [ 
      {
         "indexUid": "movie",
         "hits": [ { "title": "wonderwoman" } ],
         // other search results fields: processingTimeMs, limit, ...
      },
      {
         "indexUid": "books",
         "hits": [ { "title": "king kong theory" } ],
         // other search results fields: processingTimeMs, limit, ...
      },
   ]
}

TODO:

@brunoocasali brunoocasali added enhancement New feature or request good first issue Good for newcomers labels Apr 27, 2023
@meili-bors meili-bors bot closed this as completed in d531f70 Sep 12, 2023
@curquiza
Copy link
Member

Mistake, wrong PR, reopening

@curquiza curquiza reopened this Sep 12, 2023
jd2024 added a commit to jd2024/meilisearch-java that referenced this issue Sep 13, 2023
jd2024 added a commit to jd2024/meilisearch-java that referenced this issue Sep 21, 2023
@meili-bors meili-bors bot closed this as completed in 57f25af Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants