mirror of https://github.com/apache/lucene.git
fix MTQ.CutOffTermCollector to check limits after adding term, not before
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1025929 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f6558c7ed0
commit
b0f24be337
|
@ -759,12 +759,12 @@ public abstract class MultiTermQuery extends Query {
|
|||
|
||||
@Override
|
||||
public boolean collect(BytesRef bytes) throws IOException {
|
||||
pendingTerms.add(bytes);
|
||||
docVisitCount += termsEnum.docFreq();
|
||||
if (pendingTerms.size() >= termCountLimit || docVisitCount >= docCountCutoff) {
|
||||
hasCutOff = true;
|
||||
return false;
|
||||
}
|
||||
pendingTerms.add(bytes);
|
||||
docVisitCount += termsEnum.docFreq();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue