[v1.3] Define fields to search on at search-time (`attributesToSearchOn`)
brunoocasali opened this issue · comments
Also, if you are a maintainer, please add any clarification and instructions about this issue.
Sorry if this is already wholly/partially implemented. Feel free to let me know about the state of this issue in the repo.
Related to meilisearch/integration-guides#280
This issue is divided into two sections, first, you need to make the implementation, and second, you must update the code-samples (no one likes outdated docs, right?).
New implementation
Related to:
- issue: meilisearch/meilisearch#3772
- discussion: meilisearch/product#107 (comment)
- spec: meilisearch/specifications#251
Add support for receiving a new key, attributesToSearchOn
(an array of field names), to enable running searches over a subset of searchableAttributes
without modifying Meilisearch’s index settings.
Code samples
Inside of this file: .code-samples.meilisearch.yml
:
- Create a new entry with this key
search_parameter_guide_attributes_to_search_on_1
containing a call to thesearch
method using the new behavior
Refer to this curl example and translate it by using the java methods: https://github.com/meilisearch/documentation/blob/e4fdc3d485c22e31a045b8a71bacf18b6a7d50e0/.code-samples.meilisearch.yaml#L1103
TODO:
- Add the ability to receive a new param in the
search
method calledattributesToSearchOn
. - Add integration tests
- Update the code-samples accordingly