Skip to content

Commit 72de4c8

Browse files
committed
Add changesets
1 parent 5aff579 commit 72de4c8

File tree

3 files changed

+88
-17
lines changed

3 files changed

+88
-17
lines changed

.changeset/fresh-tables-clap.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
---
2+
"@meilisearch/instant-meilisearch": minor
3+
---
4+
5+
- Change the behavior of the `or` operator parameter on the [`RefinmentList`](https://www.algolia.com/doc/api-reference/widgets/refinement-list/js/) widget.
6+
7+
⚠️ This impacts the facet distribution number
8+
9+
## Drawback
10+
11+
Currently, for each `facet value` selected in a different `facet` a separate request is made to Meilisearch. Plus, an additional one containing all the facets filters. It results in tedious search requests and a high bandwidth cost.
12+
For example, if I select `Adventure` on genres and `Multiplayer` on players, one request is made with both facet filters, one with only `genres=Adventure` and one with only `players=Multiplayer`
13+
14+
In the next release of Meilisearch, the `multi-index` route should be released (see [PR](https://github.com/meilisearch/meilisearch/pull/3417)). When it is released, the work-around will be removed and only one request will be done in all cases!
15+
16+
17+
## Explaination
18+
19+
The way the `facet distribution` is calculated changed. The `facet distribution` shows the numbers of hits for each facet. For example:
20+
21+
Given the following facet:
22+
23+
```
24+
Genres
25+
- [ ] Adventure 7
26+
```
27+
28+
The `facet distribution` provides the information that there are 7 hits containing the adventure genre.
29+
30+
For the example, let's take the following facets:
31+
32+
```
33+
Genres
34+
- [ ] Adventure 7
35+
- [ ] Action 5
36+
- [ ] Science Fiction 5
37+
Players
38+
- [ ] Multiplayer 11
39+
- [ ] Single player 7
40+
```
41+
42+
Before, when selecting a facet value in a certain facet, the distribution of that facet was impacted.
43+
44+
```
45+
- [x] Adventure 7
46+
- [ ] Action 3 // <- number changed from 5 to 3
47+
- [ ] Science Fiction 1 // <- number changed from 5 to 1
48+
Players
49+
- [ ] Multiplayer 6
50+
- [ ] Single player 3
51+
```
52+
53+
In the new behavior the distribution number are not changed when facet values are selected inside the same facet.
54+
55+
```
56+
Genres
57+
- [x] Adventure 7
58+
- [ ] Action 5 // <- number did not change
59+
- [ ] Science Fiction 5 // <- number did not change
60+
Players
61+
- [ ] Multiplayer 6
62+
- [ ] Single player 3
63+
```
64+
65+
```
66+
Genres
67+
- [x] Adventure 7 // changed because of Multiplayer
68+
- [ ] Action 4
69+
- [ ] Science Fiction 3
70+
Players
71+
- [x] Multiplayer 6
72+
- [ ] Single player 3
73+
```
74+
75+
This is the conventional way of calculating the facet distribution. Similar to Algolia's behavior. If you prefer the old behavior, please consider opening an issue.
76+
77+
See [complete explaination here](https://github.com/meilisearch/instant-meilisearch/issues/884)

.changeset/pre.json

Lines changed: 0 additions & 17 deletions
This file was deleted.

.changeset/rich-wasps-tell.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
"@meilisearch/instant-meilisearch": minor
3+
---
4+
5+
- Compatibility with the `Index` widget is added.
6+
7+
## Drawback
8+
9+
Currently, for each index a request is made on, a separated request is made to Meilisearch. For example, if you have two indexes on which to search, two http requests are made.
10+
11+
In the next release of Meilisearch, the `multi-index` route should be released (see [PR](https://github.com/meilisearch/meilisearch/pull/3417)). When it is released, the work-around will be removed and only one request will be done in all cases!

0 commit comments

Comments
 (0)