mirror of https://github.com/apache/lucene.git
SOLR-7616: fix UniqueAgg.NumericAcc.resize
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1683357 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0311e20f81
commit
994ae6590c
|
@ -94,6 +94,10 @@ Bug Fixes
|
|||
* SOLR-7361: Slow loading SolrCores should not hold up all other SolrCores that have finished loading from serving
|
||||
requests. (Mark Miller, Timothy Potter, Ramkumar Aiyengar)
|
||||
|
||||
* SOLR-7616: Faceting on a numeric field with a unique() subfacet function on another numeric field
|
||||
can result in incorrect results or an exception. (yonik)
|
||||
|
||||
|
||||
Optimizations
|
||||
----------------------
|
||||
(no changes)
|
||||
|
|
|
@ -208,7 +208,7 @@ public class UniqueAgg extends StrAggValueSource {
|
|||
|
||||
@Override
|
||||
public void resize(Resizer resizer) {
|
||||
resizer.resize(sets, null);
|
||||
sets = resizer.resize(sets, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -932,6 +932,7 @@ public class TestJsonFacets extends SolrTestCaseHS {
|
|||
",f8:{ type:field, field:${num_i}, sort:'index desc', offset:100, numBuckets:true }" + // test high offset
|
||||
",f9:{ type:field, field:${num_i}, sort:'x desc', facet:{x:'avg(${num_d})'}, missing:true, allBuckets:true, numBuckets:true }" + // test stats
|
||||
",f10:{ type:field, field:${num_i}, facet:{a:{query:'${cat_s}:A'}}, missing:true, allBuckets:true, numBuckets:true }" + // test subfacets
|
||||
",f11:{ type:field, field:${num_i}, facet:{a:'unique(${num_d})'} ,missing:true, allBuckets:true, sort:'a desc' }" + // test subfacet using unique on numeric field (this previously triggered a resizing bug)
|
||||
"}"
|
||||
)
|
||||
, "facets=={count:6 " +
|
||||
|
@ -945,6 +946,7 @@ public class TestJsonFacets extends SolrTestCaseHS {
|
|||
",f8:{ buckets:[] , numBuckets:4 } " +
|
||||
",f9:{ buckets:[{val:7,count:1,x:11.0},{val:2,count:1,x:4.0},{val:3,count:1,x:2.0},{val:-5,count:2,x:-7.0} ], numBuckets:4, allBuckets:{count:5,x:0.6},missing:{count:1,x:0.0} } " + // TODO: should missing exclude "x" because no values were collected?
|
||||
",f10:{ buckets:[{val:-5,count:2,a:{count:0}},{val:2,count:1,a:{count:1}},{val:3,count:1,a:{count:1}},{val:7,count:1,a:{count:0}} ], numBuckets:4, allBuckets:{count:5},missing:{count:1,a:{count:0}} } " +
|
||||
",f11:{ buckets:[{val:-5,count:2,a:2},{val:2,count:1,a:1},{val:3,count:1,a:1},{val:7,count:1,a:1} ] , missing:{count:1,a:0} , allBuckets:{count:5,a:5} } " +
|
||||
"}"
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue