switch to advanceExact

This commit is contained in:
Mike McCandless 2017-04-02 16:25:09 -04:00 committed by Shalin Shekhar Mangar
parent 14e412d64a
commit a4f5dc5711
1 changed files with 1 additions and 4 deletions

View File

@ -124,10 +124,7 @@ public abstract class DiversifiedTopDocsCollector extends
// a leaf reader value when looking up keys
int leafDocID = addition.doc - docBase;
long value;
if (keys.docID() < leafDocID) {
keys.advance(leafDocID);
}
if (keys.docID() == leafDocID) {
if (keys.advanceExact(leafDocID)) {
value = keys.longValue();
} else {
value = 0;