MeiliSearch/crates/index-scheduler/src
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
..
index_mapper Keep old stat format to make sure the number of documents is available during dumpless upgrade 2025-02-27 15:17:23 +01:00
queue Expose a route to get the update file content of a task 2025-02-10 14:05:32 +01:00
scheduler Fix typos in comments and messages 2025-03-11 15:22:00 +01:00
upgrade Support dumpless upgrade for all v1.13 patches 2025-02-27 15:17:23 +01:00
dump.rs fix the missing batch in the dumps in meilisearch and meilitools 2025-02-11 11:14:49 +01:00
error.rs Improve the error message when missing documents 2025-02-10 16:53:50 +01:00
features.rs Make composite embedders experimental 2025-03-10 14:22:47 +01:00
insta_snapshot.rs Add document database stats 2025-02-26 17:01:25 +01:00
lib.rs fix the dumpless upgrade potential corruption when upgrading from the v1.12 2025-02-05 18:08:50 +01:00
lru.rs Move crates under a sub folder to clean up the code 2024-10-21 08:18:43 +02:00
processing.rs fix the missing batch in the dumps in meilisearch and meilitools 2025-02-11 11:14:49 +01:00
test_utils.rs rewrite part of the index-scheduler upgrade test 2025-01-23 16:51:23 +01:00
utils.rs make sure the batches we snapshots actually all contains an enqueued_at 2025-01-28 16:53:50 +01:00
uuid_codec.rs Move crates under a sub folder to clean up the code 2024-10-21 08:18:43 +02:00
versioning.rs fmt 2025-02-10 10:46:42 +01:00