简体   繁体   English

Solr 构面和过滤器查询之间的计数不匹配

[英]Solr count mismatch between facet and filter query

I am running solr 7.7.2 and I am trying to apply facet on a particular field "display-classification_en_string_mv" (type="string" indexed="true" stored="false" multiValued="true").我正在运行 solr 7.7.2,我正在尝试在特定字段“display-classification_en_string_mv”(type="string" indexed="true" stored="false" multiValued="true")上应用构面。 The problem is when i try to apply facets on this field, with acet=true&facet.field={.ex%3Dfkdisplay-classification}display-classification_en_string_mv&facet.mincount=1&facet.limit=10&facet,sort=count,问题是当我尝试在此字段上应用方面时,acet=true&facet.field={.ex%3Dfkdisplay-classification}display-classification_en_string_mv&facet.mincount=1&facet.limit=10&facet,sort=count,

The actual facet count i get for a variant of this field "maxi dress" is 100 as shown below.我为该字段“maxi dress”的一个变体获得的实际方面数为 100,如下所示。

facet count for value "maxi dress" under field is 100字段下值“maxi dress”的方面计数为 100

Now when i try to add a filterquery (fq) like this fq={:tag%3Dfkdisplay-classification}+display-classification_en_string_mv,"Maxi+Dress".现在,当我尝试添加这样的过滤查询(fq)时,fq={:tag%3Dfkdisplay-classification}+display-classification_en_string_mv,"Maxi+Dress"。 the actual count increases to 101.实际计数增加到 101。

after filter query count increases to 101过滤后查询计数增加到 101

One thing to note is i am using a collapse query to group documents having same value in a field of type="string" indexed="true" stored="true".需要注意的一件事是,我正在使用折叠查询对 type="string" indexed="true" stored="true" 字段中具有相同值的文档进行分组。

This count mismatch happens only when the collapse query is applied, and without the collapsing in place, the count remains same in both cases.这种计数不匹配仅在应用折叠查询时发生,并且在没有折叠到位的情况下,计数在两种情况下都保持不变。

Please let me know if i am missing something or any error in implementation which might lead to this.请让我知道我是否遗漏了某些可能导致此问题的实施错误或任何错误。

Thanks in advance提前致谢

Apparently, the collapse query selects one of the documents in the group as a leader and selects it for counting facets, and in one of the group, the leader which was getting selected didn't have the field considered for facets.显然,折叠查询选择组中的一个文档作为领导者并选择它来计数方面,而在其中一个组中,被选中的领导者没有考虑考虑方面的字段。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM