meilisearch / meilisearch/meilisearch-java
[v1.12.0] New index settings: `facetSearch` and `prefixSearch`
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 245
- Forks
- 152
- PR merge metrics
- No merged PRs in 30d
Description
Following the changes related to Meilisearch v1.12.0 mega issue
Description
Add features introduced in Meilisearch v1.12.0: the facetSearch and prefixSearch index settings.
For more information refer to the docs:
For reference, here is how these methods were implemented in JavaScript within meilisearch-js:
// get prefix search settings
const settings = await client.index('myIndex').getPrefixSearch()
// disable prefix search
await client.index('myIndex').updatePrefixSearch('disabled')
// reset prefix search settings
await client.index('myIndex').resetPrefixSearch()
// get facet search settings
const settings = await client.index('myIndex').getFacetSearch()
// disable facet search
await client.index('myIndex').updateFacetSearch(false)
// reset facet search settings
await client.index('myIndex').resetFacetSearch()
Implementation
Tasks:
- Add the relevant methods to configure
facetSearchandprefixSearchindex settings. (Note:facetSearchis partially available viaupdateGranularFilterableAttributesSettings) - The methods associated with the
/settingsAPI route (to get, reset and update the settings globally) must be able to receive in the payload the newfacetSearchandprefixSearchfields (in meilisearch-js, the equivalent methods aregetSettings(),updateSettings(), andresetSettings()) - ⚠️ Add integration tests ⚠️
- Update the code samples in
.code-samples.meilisearch.yamlto for the following keys, using the same example as their curl counterpart:- Add example for
get_facet_search_settings_1 - Add example for
update_facet_search_settings_1 - Add example for
reset_facet_search_settings_1 - Add example for
get_prefix_search_settings_1 - Add example for
update_prefix_search_settings_1 - Add example for
reset_prefix_search_settings_1
- Add example for
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Java client methods for index settings and the global /settings API, then inspect existing integration tests for comparable settings. Add get, update, and reset coverage for facetSearch and prefixSearch, update .code-samples.meilisearch.yaml with the six named examples, and run the integration tests to verify the new payloads and responses.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100