You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
⚠️ 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.
This issue is divided in two sections, first you need to make the implementation, second you must update the code-samples (no one likes a outdated docs, right?).
Gives the user the possibility to use a filter expression to retrieve documents, like in search.
Implement in the getDocuments method an internal conditional allowing the user to query the documents with the same method but using a new filter method.
When the user calls the get documents method with a filter argument, request POST /indexes/{index_uid}/documents/fetch using a JSON body containing an int offset, int limit, String[] fields and now String filter or String[] filter. ⚠️ If the method invocation does not contain a filter it should still call the previous implementation.
Code samples:
Inside of this file: .code-samples.meilisearch.yml:
Replace this key: get_documents_1: content to use the filtergenres=action, keep the index name and the limit just add the filter.
Use this as a reference if the previous description was not helpful::
get_documents_1: |-
GET 'http://localhost:7700/indexes/movies/documents?limit=2&filter=genres=action
mind the filter in the query param (use the POST route in the integrations)
Create a new entry with this key get_documents_post_1: containing a call to the getDocuments method
using the new behavior from the index movies using the filter param with this string "genres = action OR genres = adventure".
Use this as a reference if the previous description was not helpful:
get_documents_post_1: |-
POST http://localhost:7700/indexes/books/documents/fetch
with data: {
"filter": "(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English",
"fields": ["title", "genres", "rating", "language"],
"limit": 3
}
Todo:
Implement the getDocuments new behavior keeping the old behavior when possible.
Update the code-samples according to this issue.
The text was updated successfully, but these errors were encountered:
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#261
This issue is divided in two sections, first you need to make the implementation, second you must update the code-samples (no one likes a outdated docs, right?).
New implementation
Related to:
Gives the user the possibility to use a filter expression to retrieve documents, like in
search
.Implement in the
getDocuments
method an internal conditional allowing the user to query the documents with the same method but using a new filter method.When the user calls the get documents method with a
⚠️ If the method invocation does not contain a
filter
argument, requestPOST /indexes/{index_uid}/documents/fetch
using a JSON body containing anint offset
,int limit
,String[] fields
and nowString filter
orString[] filter
.filter
it should still call the previous implementation.Code samples:
Inside of this file:
.code-samples.meilisearch.yml
:get_documents_1:
content to use thefilter
genres=action
, keep theindex name
and thelimit
just add thefilter
.Use this as a reference if the previous description was not helpful::
get_documents_post_1:
containing a call to thegetDocuments
methodusing the new behavior from the index
movies
using thefilter
param with this string"genres = action OR genres = adventure"
.Use this as a reference if the previous description was not helpful:
Todo:
getDocuments
new behavior keeping the old behavior when possible.The text was updated successfully, but these errors were encountered: