MeiliSearch/meilisearch/tests
meili-bors[bot] abd954755d
Merge #4476
4476: Make the `/facet-search` route use the `sortFacetValuesBy` setting r=irevoire a=Kerollmops

This PR fixes #4423 by ensuring that the `/facet-search` route uses the `sortFacetValuesBy` setting.

Note for the documentation team (to be moved in the tracking issue): Using the new `sortFacetValuesBy` setting can slow down the facet-search requests as Meilisearch iterates over the whole list of facet values and computes the count of documents on every entry. That is hardly or even impossible to optimize correctly.

### TODO
 - [x] Create a custom HashMap wrapper for the facet `OrderBy` settings.
         This wrapper will return the `OrderBy` setting of the facet, if not defined will use the default `*` one, and if not there either (strange) will fall back on the lexicographic one.
- [x] Create a `ValuesCollection` wrapper that implements the logic for the lexicographic and count order by.
  - [x] Use it when there is no search query.
  - [x] Use it when there is a search query with and without allowed typos.
  - [x] Do not change the original logic, only use a wrapper.
- [x] Add tests

Co-authored-by: Clément Renault <clement@meilisearch.com>
2024-03-13 14:36:14 +00:00
..
assets Change the naming of attributeScale and wordScale into byAttribute and byWord 2023-12-14 16:31:00 +01:00
auth move the /logs route to the /logs/stream route 2024-02-08 15:04:05 +01:00
common create a test with the dry-run parameter enabled 2024-02-26 13:59:41 +01:00
dashboard Renames meilisearch-http to meilisearch 2022-12-08 08:22:53 -07:00
documents Merge branch 'main' into tmp-release-v1.7.0 2024-03-11 15:39:51 +01:00
dumps fix the tests and add tests on the experimental features 2024-02-08 15:04:03 +01:00
features fix the tests and add tests on the experimental features 2024-02-08 15:04:03 +01:00
index rename the cli parameter 2024-02-26 13:59:40 +01:00
logs add support for the json format in the stream route 2024-02-14 15:34:39 +01:00
search Add tests to sortFacetValuesBy count 2024-03-13 11:59:39 +01:00
settings Fix tests 2024-01-11 21:35:30 +01:00
snapshot fix the flaky test 2023-09-11 16:56:26 +02:00
stats refactor the tests suite slightly 2023-09-11 16:56:26 +02:00
swap_indexes refactor the tests suite slightly 2023-09-11 16:56:26 +02:00
tasks add the content type in the webhook + improve the test 2024-03-05 11:22:29 +01:00
content_type.rs refactor the tests suite slightly 2023-09-11 16:56:26 +02:00
integration.rs add a test 2024-02-08 15:03:33 +01:00