Details
-
Bug
-
Status: Resolved
-
Blocker
-
Resolution: Fixed
-
None
-
None
-
None
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) - see the schema excerpt below for field/type:
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: }
From schema.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"/>
Attachments
Attachments
Issue Links
- is related to
-
SOLR-10796 TestPointFields: increase randomized testing of non-trivial values
- Closed