TLDR gab inquired about dynamic faceting with custom filters. Jason explained that this would involve a computed field, which is currently not supported.
Is there any means to do what I would call naively "dynamic/on the fly faceting". I'm not sure how to explains what I want to do but lets try.
I would like to have copples of custom filter rules where the boolean result of those rules would be a facet. Then to be able to retrieve like with facets, what is the count for "true"/"false". But it seems for this I need to have a facet field in my model definition.
What could be another way than to add/update the facet based on the result of this custom filter rule on each document?
Ex. I have a facet field called `count_sellable_products` that is a number
Now I would like to add some custom filter rules like:
query: 'count_sellable_products: > 0'
query: 'count_sellable_products: > 100'
What I would like is to be able to retrieve the count for each "filter".
gab What you're referring to would be a computed field ()... We don't have support for it at the moment.
So you would have to pre-compute the field when indexing the document and then facet by that field
I see, thanks
Indexed 3051 threads
Lightning-fast, open source search engine for everyone | Knowledge Base powered by Struct.AI