0
votes

In Solr I have to fetch list of all available brands on selecting a category.

I have set fq=brand%3A"Flipkart" and in facets I set facet=true&facet.field=brand.

Initially when fq is not set for all brands i have some count value but when i apply brand as "Flipkart" the counts of other brands go down to zero. How can I still retrieve those initial counts of all brands? Result produced is as expected but count of brand goes down.

1

1 Answers

1
votes

Your question is about to filter by a facet-value. A filter which does only restrict the resultlist and but does not restrict the corresponding facet field.

What you are looking for are tagged filter queries:

q=my+main+query&fq={!tag=brandTag}brand%3A"Flipkart"&facet=true&facet.field={!ex=brandTag}brand