Is there a way to run mutliple facet queries for m...
# community-help
s
Is there a way to run mutliple facet queries for multiple facets? As in, I can specify:
"facet_by: "category,container,x,y,z"
But I can only have one facet_query: "category:shoe" as far as I see. Doing
"category:shoe,cotainer:can".
Is that correct?
k
There's no way to run multiple facet queries. Mostly because in the user interface, you tend to use it primarily for filtering within returned facets, and that's usually done on any one field only, and not on multiple fields at the same time.
s
True, but I would like to implement the following use case: I have a search bar and as the user types, I'd like to search for products with the search term in it. At the same time I'd like to do a facet_query to suggest filters, for example someone searches for "vitam", I would like to suggest "vitamin c" as a filter option. Is there a better way to implement this?
k
You can always use multi_search with N facet_queries, one for each facet. That's a work around, but eventually, yes we could support having multiple facet queries in a comma separated list as you've given above.