Skip to content

[v1.14] Filterable attributes settings opt-out #660

@Strift

Description

@Strift

This issue follows the changes related to Meilisearch v1.14.0 mega issue.

Description

Update the settings API to handle the new filterableAttributes syntax.

For more context, see the related issue in Meilisearch: meilisearch/meilisearch#5163

Tasks

  • Update the methods to update settings to accept the new filterableAttributes syntax
  • Update the methods to return the new filterableAttributes syntax (when Meilisearch returns it)
  • Update update_filterable_attributes_1 code sample in .code-samples.meilisearch.yaml

For reference, here's how the test are implemented in Meilisearch JS SDK:

// this mixes the old syntax (field name) and new syntax (settings opt-in)
const newFilterableAttributes = [
  "author",
  {
    attributePatterns: ["genre"],
    features: {
      facetSearch: true,
      filter: { equality: true, comparison: false },
    },
  },
];
// we update the filterable attributes settings
await client
  .index(index.uid)
  .updateFilterableAttributes(newFilterableAttributes)
  .waitTask();
// the method to retrieve filterable attributes settings can also return mixed syntax
const response = await client.index(index.uid).getFilterableAttributes();
expect(response).toEqual(newFilterableAttributes);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions