MeiliSearch/milli/src/search
meili-bors[bot] be72be7c0d
Merge #3942
3942: Normalize for the search the facets values r=ManyTheFish a=Kerollmops

This PR improves and fixes the search for facet values feature. Searching for _bre_ wasn't returning facet values like _brévent_ or _brô_.

The issue was related to the fact that facets are normalized but not in the same way as the `searchableAttributes` are. We decided to normalize them further and add another intermediate database where the key is the normalized facet value, and the value is a set of the non-normalized facets. We then use these non-normalized ones to get the correct counts by fetching the associated databases.

### What's missing in this PR?
 - [x] Apply the change to the whole set of `SearchForFacetValue::execute` conditions.
 - [x] Factorize the code that does an intermediate normalized value fetch in a function.
 - [x] Add or modify the search for facet value test.

Co-authored-by: Clément Renault <clement@meilisearch.com>
Co-authored-by: Kerollmops <clement@meilisearch.com>
2023-07-25 14:37:17 +00:00
..
facet Document that the LevelEntry fields order is important 2023-06-29 14:33:32 +02:00
new Replace the hnsw crate by the instant-distance one 2023-07-25 12:37:35 +02:00
fst_utils.rs custom fst automatons 2022-03-15 17:38:35 +01:00
mod.rs Implement the facet search with the normalized index 2023-07-24 17:56:17 +02:00