mirror of https://github.com/apache/lucene.git
LUCENE-2769: FilterIndexReader in trunk does not implement getSequentialSubReaders() correctly
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1036977 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
24178a6eb8
commit
7a86d09aea
|
@ -279,7 +279,7 @@ public class FilterIndexReader extends IndexReader {
|
|||
|
||||
@Override
|
||||
public Bits getDeletedDocs() {
|
||||
return MultiFields.getDeletedDocs(in);
|
||||
return in.getDeletedDocs();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -415,12 +415,12 @@ public class FilterIndexReader extends IndexReader {
|
|||
|
||||
@Override
|
||||
public IndexReader[] getSequentialSubReaders() {
|
||||
return null;
|
||||
return in.getSequentialSubReaders();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Fields fields() throws IOException {
|
||||
return MultiFields.getFields(in);
|
||||
return in.fields();
|
||||
}
|
||||
|
||||
/** If the subclass of FilteredIndexReader modifies the
|
||||
|
|
|
@ -82,4 +82,9 @@ public final class SlowMultiReaderWrapper extends FilterIndexReader {
|
|||
public void doClose() throws IOException {
|
||||
throw new UnsupportedOperationException("please call close on the original reader instead");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IndexReader[] getSequentialSubReaders() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -149,7 +149,7 @@ public class TestFilterIndexReader extends LuceneTestCase {
|
|||
//IndexReader reader = new TestReader(IndexReader.open(directory, true));
|
||||
Directory target = newDirectory();
|
||||
writer = new IndexWriter(target, newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer()));
|
||||
IndexReader reader = new TestReader(IndexReader.open(directory, true));
|
||||
IndexReader reader = new TestReader(SlowMultiReaderWrapper.wrap(IndexReader.open(directory, true)));
|
||||
writer.addIndexes(reader);
|
||||
writer.close();
|
||||
reader.close();
|
||||
|
|
Loading…
Reference in New Issue