I have a facet performance question. Basically, I ...
# community-help
t
I have a facet performance question. Basically, I have a complex query with lots of filters, and I want to get the facets for each field as well:
Copy code
facet_by: 'facetA, facetB, facetC',
filter_by: facetA := 123 && facetB := 'abc' && facetC := ['cat', 'dog']
The tricky part is that I basically want all the facet values for facetA like there was no filter for facetA in the filter, all the facet values for facetB like there was no facetB in the filter, and all the facet values for facetC like there was no facetC in the filter. My current approach is to just make N requests, where N is the amount of facet fields and then each field request has its own facet exempted from the filter_by clause. Is there anyway to just do a request with a bunch of facets and filters, and have each facet be unaffected by its own filter?
j
Because facets only operate on the current search results
t
Thanks for the quick response and the guidance link! Ah, absolutely. Completely makes sense. It’s working well for us, but I still had to ask.
😄 1