Synonyms can create excessively complex search queries #3125
Labels
impacts docs
This issue involves changes in the Meilisearch's documentation
milli
Related to the milli workspace
performance
Related to the performance in term of search/indexation speed or RAM/CPU/Disk consumption
v1.0.0
PRs/issues solved in v1.0.0 released on 2023-02-06
Milestone
When a word has a multi-word synonym, for example:
or, worse, multiple multi-word synonyms, such as:
then search queries containing these synonyms will take much longer to resolve, especially if the queries are already long and contain many words with synonyms.
The reason for this slowdown mostly comes down to the fact that we treat a multi-word synonym not as a phrase but as a list of regular search query terms.
Therefore the following search query:
gets mapped to:
as opposed to:
It is worth considering the impact of treating multi-word synonyms as phrases in terms of relevancy. If the impact is neutral or just slightly negative, then we should make this change to ensure good search performance.
TODO
main
The text was updated successfully, but these errors were encountered: