I have modified the SortedField to not access deleted documents. This caused an exception when filling the initial arrays.

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150812 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Peter Carlson 2002-09-07 01:00:57 +00:00
parent a75302f000
commit 3940b6ff1c
1 changed files with 7 additions and 3 deletions

View File

@ -73,7 +73,11 @@ public class SortedField {
int numDocs = ir.numDocs();
fieldValues = new String[numDocs];
for (int i=0; i<numDocs; i++) {
if (ir.isDeleted(i) == false){
fieldValues[i] = ir.document(i).get(fieldName);
} else {
fieldValues[i] = "";
}
}
ir.close();
}