LUCENE-3595: do acceptDocs checking after matchDoc()

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1206155 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uwe Schindler 2011-11-25 13:28:32 +00:00
parent 3b6da22aa7
commit 7d5ad4b409
1 changed files with 3 additions and 3 deletions

View File

@ -66,7 +66,7 @@ public abstract class FieldCacheDocIdSet extends DocIdSet {
}
} : new Bits() {
public boolean get(int docid) {
return acceptDocs.get(docid) && matchDoc(docid);
return matchDoc(docid) && acceptDocs.get(docid);
}
public int length() {
@ -134,14 +134,14 @@ public abstract class FieldCacheDocIdSet extends DocIdSet {
if (doc >= maxDoc) {
return doc = NO_MORE_DOCS;
}
} while (!acceptDocs.get(doc) || !matchDoc(doc));
} while (!(matchDoc(doc) && acceptDocs.get(doc)));
return doc;
}
@Override
public int advance(int target) {
for(doc=target; doc<maxDoc; doc++) {
if (acceptDocs.get(doc) && matchDoc(doc)) {
if (matchDoc(doc) && acceptDocs.get(doc)) {
return doc;
}
}