mirror of https://github.com/apache/lucene.git
LUCENE-5440: fix bug in FacetComponent
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1568824 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e75fd19a7d
commit
1482c3c12d
|
@ -451,7 +451,7 @@ public class FacetComponent extends SearchComponent
|
|||
long maxCount = sfc.count;
|
||||
for (int shardNum=0; shardNum<rb.shards.length; shardNum++) {
|
||||
FixedBitSet fbs = dff.counted[shardNum];
|
||||
if (fbs!=null && !fbs.get(sfc.termNum)) { // fbs can be null if a shard request failed
|
||||
if (fbs!=null && (sfc.termNum >= fbs.length() || !fbs.get(sfc.termNum))) { // fbs can be null if a shard request failed
|
||||
// if missing from this shard, add the max it could be
|
||||
maxCount += dff.maxPossible(sfc,shardNum);
|
||||
}
|
||||
|
@ -466,7 +466,7 @@ public class FacetComponent extends SearchComponent
|
|||
// add a query for each shard missing the term that needs refinement
|
||||
for (int shardNum=0; shardNum<rb.shards.length; shardNum++) {
|
||||
FixedBitSet fbs = dff.counted[shardNum];
|
||||
if(fbs!=null && !fbs.get(sfc.termNum) && dff.maxPossible(sfc,shardNum)>0) {
|
||||
if(fbs!=null && (sfc.termNum >= fbs.length() || !fbs.get(sfc.termNum)) && dff.maxPossible(sfc,shardNum)>0) {
|
||||
dff.needRefinements = true;
|
||||
List<String> lst = dff._toRefine[shardNum];
|
||||
if (lst == null) {
|
||||
|
|
Loading…
Reference in New Issue