Skip to content

Conversation

@bidoubiwa
Copy link
Contributor

@bidoubiwa bidoubiwa commented Sep 1, 2022

Introduces optionalWords search parameter.
It lets you decide the search strategy for words matching during a search.

matchingStrategy gives you the possibility to chose how Meilisearch should handle the presence of multiple query words.

For example, if your query is Hello world by default Meilisearch returns documents containing either both Hello and world or documents that only contain hello. This is the last strategy, where words are stripped from the right.
The other strategy is all, where both hello and worlds must be present in a document for it to be returned.

import { instantMeiliSearch } from '@meilisearch/instant-meilisearch'

const searchClient = instantMeiliSearch(
  host,
  apiKey,
  {
      matchingStrategy: 'all' // default last
  }
)

@bidoubiwa bidoubiwa changed the base branch from main to bump-meilisearch-v0.29.0 September 1, 2022 13:08
@bidoubiwa bidoubiwa force-pushed the update_search_parameters_for_v0.29.0 branch from 30ee804 to bba3db8 Compare September 1, 2022 13:31
@bidoubiwa bidoubiwa marked this pull request as ready for review September 1, 2022 13:32
Copy link
Member

@mdubus mdubus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🥳

@bidoubiwa bidoubiwa merged commit cb77bb1 into bump-meilisearch-v0.29.0 Sep 5, 2022
@bidoubiwa bidoubiwa deleted the update_search_parameters_for_v0.29.0 branch September 5, 2022 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants