MeiliSearch/meilisearch/tests
meili-bors[bot] 5509bafff8
Merge #4535
4535: Support Negative Keywords r=ManyTheFish a=Kerollmops

This PR fixes #4422 by supporting `-` before any word in the query.

The minus symbol `-`, from the ASCII table, is not the only character that can be considered the negative operator. You can see the two other matching characters under the `Based on "-" (U+002D)` section on [this unicode reference website](https://www.compart.com/en/unicode/U+002D).

It's important to notice the strange behavior when a query includes and excludes the same word; only the derivative ( synonyms and split) will be kept:
 - If you input `progamer -progamer`, the engine will still search for `pro gamer`.
 - If you have the synonym `like = love` and you input `like -like`, it will still search for `love`.

## TODO
 - [x] Add analytics
 - [x] Add support to the `-` operator
 - [x] Make sure to support spaces around `-` well
 - [x] Support phrase negation
 - [x] Add tests


Co-authored-by: Clément Renault <clement@meilisearch.com>
2024-04-04 13:10:27 +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 add an error code test on the setting 2024-03-19 11:14:28 +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 rename the search_cutoff parameter to search_cutoff_ms 2024-03-19 10:35:47 +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 Merge #4535 2024-04-04 13:10:27 +00:00
settings Add tests 2024-03-26 10:36:56 +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