LUCENE-4908: Fix SortingDocsAndPositionsEnum.docID() when the enum is not positioned yet.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1464768 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Adrien Grand 2013-04-04 21:12:47 +00:00
parent b6a89d97cb
commit 88ae7ffa13
1 changed files with 1 additions and 1 deletions

View File

@ -559,7 +559,7 @@ public class SortingAtomicReader extends FilterAtomicReader {
@Override
public int docID() {
return docIt >= upto ? NO_MORE_DOCS : docs[docIt];
return docIt < 0 ? -1 : docIt >= upto ? NO_MORE_DOCS : docs[docIt];
}
@Override