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
{{ message }}
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.
When filters are added before the first document they will be implicitly added in the searchableAttributes. After which the
attributes found in new documents will be added in order of appearance.
To Reproduce
Add settings filterableAttributes: "genres"
Add documents with the following fields: id, title, genres, ..
Thus the implicit value of searchableAttributes becomes * == ["genres", "id", "title",...]
Now given a concrete example, here is a dataset:
[{id: 11,title: 'Star Wars',overview:
'Princess Leia is captured and held hostage by the evil Imperial forces in their effort to take over the galactic Empire. Venturesome Luke Skywalker and dashing captain Han Solo team together with the loveable robot duo R2-D2 and C-3PO to rescue the beautiful princess and restore peace and justice in the Empire.',genres: ['Adventure','Action','Science Fiction'],poster: 'https://image.tmdb.org/t/p/w500/6FfCtAuVAW8XJjZ7eWeLibRLWTw.jpg',release_date: 233366400,},{id: 30,title: 'Magnetic Rose',overview: '',genres: ['Animation','Science Fiction'],poster: 'https://image.tmdb.org/t/p/w500/gSuHDeWemA1menrwfMRChnSmMVN.jpg',release_date: 819676800,},]
When doing a search on query = S I will receive Magnetic Rose instead of Star Wars.
Expected behavior
This behavior impacts the relevancy in an unexpected way(see example above). It also go against what is written in the documentation.
This means that the initial order will be based on the order of attributes in the first document indexed, with each new attribute found in subsequent documents added at the end of this list.
If we keep this behavior it has an impact on the documentation as. There are occurrences where we ask user to first add settings and then documentation. We suggest this to avoid two complete indexation of the dataset.
We now have to suggest the opposite. On big datasets this means 2*times indexation time.
MeiliSearch version:
0.21.0
The text was updated successfully, but these errors were encountered:
curquiza
changed the title
V0.21 Relevancy impacted by settings added before first document
Relevancy impacted by settings added before first document
Jul 26, 2021
Describe the bug
related to meilisearch/meilisearch#1495
When filters are added before the first document they will be implicitly added in the
searchableAttributes
. After which theattributes found in new documents will be added in order of appearance.
To Reproduce
filterableAttributes: "genres"
id, title, genres, ..
searchableAttributes
becomes* == ["genres", "id", "title",...]
Now given a concrete example, here is a dataset:
When doing a search on
query = S
I will receiveMagnetic Rose
instead ofStar Wars
.Expected behavior
This behavior impacts the relevancy in an unexpected way(see example above). It also go against what is written in the documentation.
If we keep this behavior it has an impact on the documentation as. There are occurrences where we ask user to first add settings and then documentation. We suggest this to avoid two complete indexation of the dataset.
We now have to suggest the opposite. On big datasets this means 2*times indexation time.
MeiliSearch version:
0.21.0
The text was updated successfully, but these errors were encountered: