[
https://issues.apache.org/jira/browse/SOLR-6174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14034362#comment-14034362
]
Scott Smerchek commented on SOLR-6174:
--------------------------------------
It is interesting, indeed.
It's not so much that we want redundant facet queries, but we are generating
the facet queries based on user input, so it's possible the user for some
reason has duplicate queries.
For us, the best workaround is to simply distinct the facet queries before
passing them in. Since they are identical, when we read out the results we look
up the count and get the correct result for both.
> 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]