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
-[`finitePagination`](#finite-pagination): Used to work with the [`pagination`](#-pagination) widget (default: `false`) .
84
84
-[`primaryKey`](#primary-key): Specify the primary key of your documents (default `undefined`).
85
85
-[`keepZeroFacets`](#keep-zero-facets): Show the facets value even when they have 0 matches (default `false`).
86
+
-[`matchingStrategy`](#matching-strategy): Determine the search strategy on words matching (default `last`).
86
87
87
88
The options are added as the third parameter of the `instantMeilisearch` function.
88
89
@@ -170,6 +171,21 @@ genres:
170
171
{ keepZeroFacets :true } // default: false
171
172
```
172
173
174
+
### Matching strategy
175
+
176
+
`matchingStrategy` gives you the possibility to chose how Meilisearch should handle the presence of multiple query words.
177
+
178
+
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.
179
+
The other strategy is `all`, where both `hello` and `worlds`**must** be present in a document for it to be returned.
180
+
181
+
// TODO: add documentation link
182
+
183
+
```js
184
+
{
185
+
matchingStrategy:'all'// default last
186
+
}
187
+
```
188
+
173
189
## 🪡 Example with InstantSearch
174
190
175
191
The open-source [InstantSearch](https://www.algolia.com/doc/api-reference/widgets/js/) library powered by Algolia provides all the front-end tools you need to highly customize your search bar environment.
0 commit comments