[英]SOLR Facet Search- Facet count changes
In Solr I have to fetch list of all available brands on selecting a category. 在Solr中,我必须在选择类别时获取所有可用品牌的列表。
I have set fq=brand%3A"Flipkart"
and in facets I set facet=true&facet.field=brand
. 我设置了
fq=brand%3A"Flipkart"
并且在构面中设置了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. 最初,当未为所有品牌都设置
fq
时,我具有一定的计数值,但是当我将品牌应用为“ Flipkart”时,其他品牌的计数将降至零。 How can I still retrieve those initial counts of all brands? 我如何仍可以检索所有品牌的初始计数? Result produced is as expected but count of brand goes down.
产生的结果如预期,但品牌数下降。
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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.