Skip to content

Make all attributes filterable #5156

Answered by irevoire
eikooc asked this question in Q&A
Dec 12, 2024 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

Hey, @eikooc, you're right. Meilisearch doesn't currently support this.

In the meantime, the only trick I can give you is that the nested fields already support this feature.
If you put all your filterable fields in a sub-object like that:

{
  "filterable": {
    "id": 38,
    "price"85,
    "colors": ["red", "green"]
  }
  // You can put any non-filterable fields you want here
}

Then you can make the filterable field, well, filterable: { "filterableAttributes": ["filterable"] }, and it should make all the fields inside it filterable.

Warning

But take care. Making everything filterable, including the fields that should be searchable, is generally not a good idea.
You want to have as few…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@eikooc
Comment options

@irevoire
Comment options

@eikooc
Comment options

Answer selected by eikooc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants