MeiliSearch/crates/meilisearch/tests
meili-bors[bot] a2a86ef4e2
Merge #5254
5254: Granular Filterable attribute settings r=ManyTheFish a=ManyTheFish

# Related
**Issue:** https://github.com/meilisearch/meilisearch/issues/5163
**PRD:** https://meilisearch.notion.site/API-usage-Settings-to-opt-out-indexing-features-filterableAttributes-1764b06b651f80aba8bdf359b2df3ca8

# Summary
Change the `filterableAttributes` settings to let the user choose which facet feature he wants to activate or not.
Deactivating a feature will avoid some database computation in the indexing process and save time and disk size.

# Example

`PATCH /indexes/:index_uid/settings`

```json
{
  "filterableAttributes": [
    {
      "patterns": [
        "cattos",
        "doggos.age"
      ],
      "features": {
        "facetSearch": false,
        "filter": {
          "equality": true,
          "comparison": false
        }
      }
    }
  ]
}
```

# Impact on the codebase
- Settings API:
  - `/settings`
  - `/settings/filterable-attributes`
  - OpenAPI 
  - may impact the LocalizedAttributesRules due to the AttributePatterns factorization
- Database:
  - Filterable attributes format changed
  - Faceted field_ids are no more stored in the database
  - FieldIdsMap has no more unexisting fields
- Search:
  - Search using filters
  - Facet search
  - `Attributes` ranking rule
  - Distinct attribute
  - Facet distribution
- Settings reindexing:
  - searchable
  - facet
  - vector
  - geo
- Document indexing:
  - searchable
  - facet
  - vector
  - geo
- Dump import

# Note for the reviewers
The changes are huge and have been split in different commits with a dedicated explanation, I suggest reviewing the commit 1by1

Co-authored-by: ManyTheFish <many@meilisearch.com>
2025-03-12 09:00:43 +00:00
..
assets add a dump test with batches and enqueued tasks 2025-02-11 11:14:49 +01:00
auth Add new permissions 2025-02-05 15:03:16 +01:00
batches Rename callTrace into progressTrace 2025-02-25 10:09:03 +01:00
common Merge branch 'main' into granular-filterable-attributes 2025-03-11 10:05:58 +01:00
dashboard Move crates under a sub folder to clean up the code 2024-10-21 08:18:43 +02:00
documents Fix typos in comments and messages 2025-03-11 15:22:00 +01:00
dumps Add tests about experimentalness of the feature and fix existing 2025-03-10 14:23:22 +01:00
features Add tests about experimentalness of the feature and fix existing 2025-03-10 14:23:22 +01:00
index fix clippy error 2025-01-21 17:11:29 +01:00
logs #4840 - Partial fix - Confirm task success after waiting for it. 2024-12-24 23:06:07 +11:00
network network integration tests 2025-02-05 15:03:32 +01:00
search Fix typos in comments and messages 2025-03-11 15:22:00 +01:00
settings Add default deserialize value 2025-03-11 17:55:49 +01:00
similar Fix typos in comments and messages 2025-03-11 15:22:00 +01:00
snapshot Skip a snapshot test on Windows 2025-03-03 10:44:28 +01:00
stats Update Snapshots 2025-02-26 17:01:37 +01:00
swap_indexes #4840 - Partial fix - Remove hard coded task ids to prevent flaky tests. 2024-12-24 23:05:59 +11:00
tasks Add the new tasks with most of the job done 2025-01-23 16:48:32 +01:00
upgrade Bump v1.13.2 to v1.13.3 in the TOMLs and snaps 2025-03-05 15:24:53 +01:00
vector Add tests about experimentalness of the feature and fix existing 2025-03-10 14:23:22 +01:00
content_type.rs Move crates under a sub folder to clean up the code 2024-10-21 08:18:43 +02:00
integration.rs network integration tests 2025-02-05 15:03:32 +01:00