You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2015/07/25 03:09:04 UTC

[jira] [Updated] (SOLR-7829) Pivot Facet Bug: facet.missing=true + facet.sort=index facet.pivot.mincount > ? == incorrect "missing" count

     [ https://issues.apache.org/jira/browse/SOLR-7829?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hoss Man updated SOLR-7829:
---------------------------
    Attachment: SOLR-7829.patch

Huh.

Well apparently the pivot refinement code has incorrectly never bothered to refining the "missing" count ... weird.

Because the missing count isn't affected by the facet.limit, this only affects indexes & queries where facet.sort=index and at least one shard has a missing count that falls below the "per shard" mincount (facet.mincount / numShards).

The attached patch has...

* DistributedFacetPivotSmallTest
** trivially little change that i made the harden that test -- doesn't catch this error because the number of docs is too small
* DistributedFacetPivotLargeTest
** non-randomized test that demonstrates the problem
* PivotFacetField
** fix for the bug to do proper refinement of the missing count

I'll let my laptop hammer on this over the weekend and plan to commit monday.

> Pivot Facet Bug: facet.missing=true + facet.sort=index facet.pivot.mincount > ? == incorrect "missing" count
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-7829
>                 URL: https://issues.apache.org/jira/browse/SOLR-7829
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Hoss Man
>            Assignee: Hoss Man
>         Attachments: SOLR-7829.patch
>
>
> Following up on SOLR-7804 lead to this error which i'm splitting off into it's own issue.  the nuthsell is that if you combine facet.missing, facet.pivot.mincount, and facet.sort=index you might get incorrect counts (or no counts at all) for the missing value of a pivot.
> fairly easy to reproduce the most extreme aspect of the problem (not getting a missing count back even though it's above the minumum)...
> {noformat}
> bin/solr -e cloud -noprompt
> bin/post -c gettingstarted example/exampledocs/*.xml
> http://localhost:8983/solr/gettingstarted/query?rows=0&q=*:*&facet=true&facet.pivot=inStock&facet.missing=true
> ...
>     "facet_pivot":{
>       "inStock":[{
>           "field":"inStock",
>           "value":true,
>           "count":17},
>         {
>           "field":"inStock",
>           "value":false,
>           "count":4},
>         {
>           "field":"inStock",
>           "value":null,
>           "count":11}]}}}
> http://localhost:8983/solr/gettingstarted/query?rows=0&q=*:*&facet=true&facet.pivot=inStock&facet.missing=true&facet.pivot.mincount=10
> ...
>     "facet_pivot":{
>       "inStock":[{
>           "field":"inStock",
>           "value":true,
>           "count":17},
>         {
>           "field":"inStock",
>           "value":null,
>           "count":11}]}}}
> http://localhost:8983/solr/gettingstarted/query?rows=0&q=*:*&facet=true&facet.pivot=inStock&facet.missing=true&facet.pivot.mincount=10&facet.sort=index
> ...
>     "facet_pivot":{
>       "inStock":[{
>           "field":"inStock",
>           "value":true,
>           "count":17}]}}}
> {noformat}
> ...note that in the last example, the 'null' count is gone (even though it's above the minimum) just because we changed the facet.sort.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org