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
888: Add multi index and disjunctive facet search r=bidoubiwa a=bidoubiwa
⚠️ NOT working with `keepzerofacet`
Using the `Index` widget, it is now possible to do mult-index search, see example bellow.
By introducing the multi index search. we automatically introduce disjunctive facet search.
Related to: #774#789
# Multi index search
```jsx
<InstantSearch indexName="movies" searchClient={searchClient}>
<SearchBox />
<h2>Movies</h2>
<Index indexName="movies">
<Hits hitComponent={Hit} />
</Index>
<h2>Games</h2>
<Index indexName="games">
<Hits hitComponent={Hit} />
</Index>
</InstantSearch>
```
https://user-images.githubusercontent.com/33010418/203822998-8fc99a62-970f-42a9-95bb-ab09d3c67a9d.mp4
## Disjunctive facet search
https://user-images.githubusercontent.com/33010418/204564207-576bca0c-344b-427c-a1a1-e10ddd7a677f.mp4
# Multi index + disjunctive facet search
https://user-images.githubusercontent.com/33010418/204565010-d4564fdb-88a0-46ad-8dc0-bb6761798e49.mp4
## TODO
- [x] Should work on simple search
- [x] Should be compatible with following widgets:
- [x] Pagination
- [x] RefinementList
- [x] Should be compatible with all Meilisearch parameters
- [x] placeholder search
- [x] finite pagination
- [ ] keep zero facets ⚠️ Fixed in disjunctive facet search PR
- [x] check state of cache
Co-authored-by: Charlotte Vermandel <[email protected]>
Co-authored-by: cvermand <[email protected]>
`Index` is the component that lets you apply widgets to a dedicated index. It’s useful if you want to build an interface that targets multiple indices.
347
347
348
-
Not compatible as Meilisearch does not support federated search on multiple indexes.
349
-
350
-
If you'd like to see federated search implemented please vote for it in the [roadmap](https://roadmap.meilisearch.com/c/74-multi-index-search?utm_medium=social&utm_source=portal_share).
348
+
Using this component, instant-meilisearch does an http-request for each different `Index` widget added. More http requests are made when using the [`RefinementList`](#✅-refinementlist) widget.
351
349
352
350
### ✅ SearchBox
353
351
@@ -672,6 +670,9 @@ The `refinementList` widget is one of the most common widgets you can find in a
672
670
- ✅ templates: The templates to use for the widget.
673
671
- ✅ cssClasses: The CSS classes to override.
674
672
673
+
The `RefinementList` widget uses the `disjunctive facet search` principle when using the `or` operator. For each different facet category used, an additional http call is made.
674
+
For example, if I ask for `color=green` and `size=2`, three http requests are made. One for the hits, one for the `color` distribution and one for the `size` distribution. To provide any feedback on the subject, refer to [this discussion](https://github.com/meilisearch/product/issues/54).
675
+
675
676
The following example will create a UI component with the a list of genres on which you will be able to facet.
0 commit comments