Filterable attributes not updating when number of fields do not change

Created on 8 September 2023, about 1 year ago

Problem/Motivation

Filterable attributes are set to update whenever an index is updated and a check is made comparing number of filterable attributes in Meilisearch against number of fields in search api index.

This logic is however not good as you can remove a field on the index and add another field. The field is not different on the index but the count is the same and the filterable attributes do not update.

Steps to reproduce

  • Create a meilisearch index
  • Add a field "title" and save the fields
  • Meilisearch has "title" field as filterable attribute
  • Edit index fields, remove "title" field, add "body" field (or rename "title" field to "body") then save the fields
  • Meilisearch still has "title" field as filterable attribute

Proposed resolution

Do not check count but check the difference of values themselves like we do for sortable attributes.

Remaining tasks

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇸🇮Slovenia bcizej

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024