lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Rowe (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (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
Date Mon, 10 Jul 2017 21:42:00 GMT

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

Steve Rowe updated SOLR-11043:
------------------------------
    Description: 
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):

{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}

  was:
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 specified {{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):

{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}


> 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
>
> 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):
> {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}



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

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


Mime
View raw message