1224: fix synonyms normalization r=MarinPostma a=LegendreM

Synonyms needs to be indexed in ascendant order,
and the new normalization step for synonyms potentially changes this order
which break the indexation process
because "Harry Potter" > "HP"  but "harry potter" < "hp"

Co-authored-by: many <maxime@meilisearch.com>
This commit is contained in:
bors[bot] 2021-02-04 15:37:33 +00:00 committed by GitHub
commit b1d9ad7134
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 4 deletions

View file

@ -171,6 +171,8 @@ async fn write_all_and_update() {
"synonyms": {
"road": ["street", "avenue"],
"street": ["avenue"],
"HP": ["Harry Potter"],
"Harry Potter": ["HP"]
},
"attributesForFaceting": ["title"],
});
@ -208,6 +210,8 @@ async fn write_all_and_update() {
"synonyms": {
"road": ["street", "avenue"],
"street": ["avenue"],
"hp": ["harry potter"],
"harry potter": ["hp"]
},
"attributesForFaceting": ["title"],
});