mirror of
https://github.com/apache/lucene.git
synced 2025-02-07 18:49:03 +00:00
SOLR-792: fix comparison for mincount
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1065020 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5d8790eb85
commit
cbf8d878f7
@ -102,7 +102,7 @@ public class PivotFacetHelper
|
|||||||
List<NamedList<Object>> values = new ArrayList<NamedList<Object>>( superFacets.size() );
|
List<NamedList<Object>> values = new ArrayList<NamedList<Object>>( superFacets.size() );
|
||||||
for (Map.Entry<String, Integer> kv : superFacets) {
|
for (Map.Entry<String, Integer> kv : superFacets) {
|
||||||
// Only sub-facet if parent facet has positive count - still may not be any values for the sub-field though
|
// Only sub-facet if parent facet has positive count - still may not be any values for the sub-field though
|
||||||
if (kv.getValue() > minMatch ) {
|
if (kv.getValue() >= minMatch ) {
|
||||||
// don't reuse the same BytesRef each time since we will be constructing Term
|
// don't reuse the same BytesRef each time since we will be constructing Term
|
||||||
// objects that will most likely be cached.
|
// objects that will most likely be cached.
|
||||||
BytesRef termval = new BytesRef();
|
BytesRef termval = new BytesRef();
|
||||||
@ -122,7 +122,7 @@ public class PivotFacetHelper
|
|||||||
SimpleFacets sf = getFacetImplementation(rb.req, subset, rb.req.getParams());
|
SimpleFacets sf = getFacetImplementation(rb.req, subset, rb.req.getParams());
|
||||||
|
|
||||||
NamedList<Integer> nl = sf.getTermCounts(subField);
|
NamedList<Integer> nl = sf.getTermCounts(subField);
|
||||||
if (nl.size() > minMatch ) {
|
if (nl.size() >= minMatch ) {
|
||||||
pivot.add( "pivot", doPivots( nl, subField, nextField, fnames, rb, subset, minMatch ) );
|
pivot.add( "pivot", doPivots( nl, subField, nextField, fnames, rb, subset, minMatch ) );
|
||||||
values.add( pivot ); // only add response if there are some counts
|
values.add( pivot ); // only add response if there are some counts
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user