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
`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.
352
352
353
-
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.
@@ -675,9 +673,6 @@ The `refinementList` widget is one of the most common widgets you can find in a
675
673
- ✅ templates: The templates to use for the widget.
676
674
- ✅ cssClasses: The CSS classes to override.
677
675
678
-
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.
679
-
For example, if I ask for `color=green` and `size=2`, three http requests are made. One for the hits, one for the `color` facet distribution, and one for the `size` facet distribution. To provide feedback on the subject, refer to [this discussion](https://github.com/meilisearch/product/issues/54).
680
-
681
676
The following example will create a UI component with the a list of genres on which you will be able to facet.
682
677
683
678
```js
@@ -746,54 +741,14 @@ The `rangeSlider` widget provides a user-friendly way to filter the results, bas
746
741
- ✅ attribute: The name of the attribute in the document. _required_.
747
742
- ✅ min: The minimum value for the input. _required_
748
743
- ✅ max: The maximum value for the input. _required_
749
-
-❌ precision: The number of digits after the decimal point to use. Not compatible as only integers work with `rangeSlider`.
744
+
-✅ precision: The number of digits after the decimal point to use. Not compatible as only integers work with `rangeSlider`.
750
745
- ✅ step: The number of steps between each handle move.
751
746
- ✅ pips: Whether to show slider pips (ruler marks).
752
747
- ✅ tooltips: Whether to show tooltips. The default tooltips show the raw value.
753
748
- ✅ cssClasses: The CSS classes to override.
754
749
755
-
#### ⚠️ The component is compatible but only by applying the following requirements:
756
-
757
-
#### 1. Manual Min Max
758
-
759
-
Min and max of attributes are not returned from Meilisearch and thus **must be set manually**.
760
-
761
-
```js
762
-
instantsearch.widgets.rangeSlider({
763
-
// ...
764
-
min:0,
765
-
max:100000,
766
-
}),
767
-
```
768
-
769
-
#### 2. Attribute must be in `filterableAttributes`
770
-
771
-
If the attribute is not in the [`filterableAttributes`](https://docs.meilisearch.com/reference/features/filtering_and_faceted_search.html#configuring-filters) setting list, filtering on this attribute is not possible.
772
-
773
-
Example:
774
-
Given the attribute `id` that has not been added in `filterableAttributes`:
775
-
776
-
```js
777
-
instantsearch.widgets.rangeSlider({
778
-
attribute:'id',
779
-
// ...
780
-
}),
781
-
```
782
-
783
-
The widget throws the following error:
784
-
785
-
```json
786
-
{
787
-
"message": " .. attribute `id` is not filterable, available filterable attributes are: author, price, genres",
To avoid this error, the attribute must be added to the [`filterableAttributes` setting](https://docs.meilisearch.com/reference/api/filterable_attributes.html#get-filterable-attributes).
750
+
To be able to use the `rangeSlider` on an attribute, the attribute must be in the[`filterableAttributes`](https://docs.meilisearch.com/reference/features/filtering_and_faceted_search.html#configuring-filters) and must contain numeric values.
795
751
796
-
After these steps, `rangeSlider` becomes compatible.
797
752
798
753
### ✅ Menu
799
754
@@ -837,7 +792,7 @@ The `rangeInput` widget allows a user to select a numeric range using a minimum
837
792
- ✅ templates: The templates to use for the widget.
838
793
- ✅ cssClasses: The CSS classes to override.
839
794
840
-
⚠️ Not compatible with Meilisearch by default, needs a workaround. See workaround in [RangeSlider](#-rangeslider) section.
795
+
To be able to use the `RangeInput` on an attribute, the attribute must be in the[`filterableAttributes`](https://docs.meilisearch.com/reference/features/filtering_and_faceted_search.html#configuring-filters) and must contain numeric values.
0 commit comments