[ 
https://issues.apache.org/jira/browse/SOLR-6174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14034324#comment-14034324
 ] 

Hoss Man commented on SOLR-6174:
--------------------------------

Interesting edge case.

I haven't looked closely, but this is probably due to how the distributed facet 
logic collects the results from multiple shards -- it's probably looping over 
the results from each shard and incrementing the local state w/o considering 
the possibility of duplicates.

i'm not sure why you would really *want* multiple redundant facet queries 
unless you were also using tag/ex localparams (which should bypass this 
problem) but using the "key" localparam should be a viable work around until a 
proper fix can be made. 

> Facet count incorrect when duplicate facet queries (facet.query) are specified
> ------------------------------------------------------------------------------
>
>                 Key: SOLR-6174
>                 URL: https://issues.apache.org/jira/browse/SOLR-6174
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 4.7.2
>            Reporter: Scott Smerchek
>            Priority: Minor
>              Labels: facet
>
> A request like:
> {{facet=true&facet.query=test}} correctly returns
> {noformat}
> {
>   "facet_counts": {
>      "facet_queries": {
>         "test": 3
>      }
>   }
> } 
> {noformat}
> But, specifying the {{facet.query}} more than once like 
> {{facet=true&facet.query=test&facet.query=test}} will sum the results of both 
> queries, returning double the correct count.
> {noformat}
> {
>   "facet_counts": {
>      "facet_queries": {
>         "test": 6
>      }
>   }
> } 
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to