[jira] [Resolved] (SOLR-11043) Negative single-valued float field values are not included in facet range counts when the field has docvalues and facet.range.method=dv

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[jira] [Resolved] (SOLR-11043) Negative single-valued float field values are not included in facet range counts when the field has docvalues and facet.range.method=dv

JIRA jira@apache.org

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

Tomás Fernández Löbbe resolved SOLR-11043.
------------------------------------------
    Resolution: Fixed

> Negative single-valued float field values are not included in facet range counts when the field has docvalues and facet.range.method=dv
> ---------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-11043
>                 URL: https://issues.apache.org/jira/browse/SOLR-11043
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public)
>            Reporter: Steve Rowe
>            Assignee: Tomás Fernández Löbbe
>            Priority: Blocker
>             Fix For: 7.0
>
>         Attachments: SOLR-11043.patch, SOLR-11043.patch, SOLR-11043.patch
>
>
> Found while increasing TestPointsField randomization on SOLR-10796:
> When a non-multiValued float field, either Trie- or points-based, has docvalues and a facet.range request uses {{facet.range.method=dv}}, negative values are not included in the facet range counts.
> This test added to SimpleFacetsTest succeeds for the request with {{facet.range.method=filter}}, but fails for the same request with {{facet.range.method=dv}} (failure is on line 17 in the listing below) - see the schema excerpt below for field/type:
> {code:java}
>  1:  public void testDvMethodNegativeFloatRangeFacet() throws Exception {
>  2:    String field = "negative_num_f1_dv";
>  3:    assertTrue(h.getCore().getLatestSchema().getField(field).hasDocValues());
>  4:
>  5:    final String[] commonParams = {
>  6:        "q", "*:*", "facet", "true", "facet.range.start", "-2", "facet.range.end", "0", "facet.range.gap", "2"
>  7:    };
>  8:    final String countAssertion
>  9:        = "//lst[@name='facet_counts']/lst[@name='facet_ranges']/lst[@name='%s']/lst[@name='counts']/int[@name='-2.0'][.='1']";
> 10:
> 11:    assertU(adoc("id", "10001", field, "-1.0"));
> 12:    assertU(commit());
> 13:
> 14:    assertQ(req(commonParams, "facet.range", field, "facet.range.method", "filter"),
> 15:        String.format(countAssertion, field)
> 16:    );
> 17:    assertQ(req(commonParams, "facet.range", field, "facet.range.method", "dv"),
> 18:        String.format(countAssertion, field)
> 19:    );
> 20:  }
> {code}
> From {{schema.xml}}:
> {code:xml}
>   <fieldType name="float" class="${solr.tests.FloatFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
>   <dynamicField name="*_f1_dv" type="float" indexed="true" stored="true" docValues="true" multiValued="false"/>
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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

Loading...