Rename local variable docIdSetIterator to filterDocIdIterator in IndexSearcher.java.

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@619685 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Busch 2008-02-07 23:22:34 +00:00
parent 9adff2072a
commit 0d2df7b785
1 changed files with 5 additions and 6 deletions

View File

@ -138,25 +138,24 @@ public class IndexSearcher extends Searcher {
return; return;
} }
DocIdSetIterator docIdSetIterator = filter.getDocIdSet(reader).iterator(); // CHECKME: use ConjunctionScorer here? DocIdSetIterator filterDocIdIterator = filter.getDocIdSet(reader).iterator(); // CHECKME: use ConjunctionScorer here?
boolean more = docIdSetIterator.next() && scorer.skipTo(docIdSetIterator.doc()); boolean more = filterDocIdIterator.next() && scorer.skipTo(filterDocIdIterator.doc());
while (more) { while (more) {
int filterDocId = docIdSetIterator.doc(); int filterDocId = filterDocIdIterator.doc();
if (filterDocId > scorer.doc() && !scorer.skipTo(filterDocId)) { if (filterDocId > scorer.doc() && !scorer.skipTo(filterDocId)) {
more = false; more = false;
} else { } else {
int scorerDocId = scorer.doc(); int scorerDocId = scorer.doc();
if (scorerDocId == filterDocId) { // permitted by filter if (scorerDocId == filterDocId) { // permitted by filter
results.collect(scorerDocId, scorer.score()); results.collect(scorerDocId, scorer.score());
more = docIdSetIterator.next(); more = filterDocIdIterator.next();
} else { } else {
more = docIdSetIterator.skipTo(scorerDocId); more = filterDocIdIterator.skipTo(scorerDocId);
} }
} }
} }
} }
public Query rewrite(Query original) throws IOException { public Query rewrite(Query original) throws IOException {