lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r1036977 - in /lucene/dev/trunk/lucene/src: java/org/apache/lucene/index/FilterIndexReader.java java/org/apache/lucene/index/SlowMultiReaderWrapper.java test/org/apache/lucene/index/TestFilterIndexReader.java
Date Fri, 19 Nov 2010 18:49:55 GMT
Author: uschindler
Date: Fri Nov 19 18:49:54 2010
New Revision: 1036977

URL: http://svn.apache.org/viewvc?rev=1036977&view=rev
Log:
LUCENE-2769: FilterIndexReader in trunk does not implement getSequentialSubReaders() correctly

Modified:
    lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/FilterIndexReader.java
    lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/SlowMultiReaderWrapper.java
    lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestFilterIndexReader.java

Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/FilterIndexReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/FilterIndexReader.java?rev=1036977&r1=1036976&r2=1036977&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/FilterIndexReader.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/FilterIndexReader.java Fri Nov
19 18:49:54 2010
@@ -279,7 +279,7 @@ public class FilterIndexReader extends I
   
   @Override
   public Bits getDeletedDocs() {
-    return MultiFields.getDeletedDocs(in);
+    return in.getDeletedDocs();
   }
   
   @Override
@@ -415,12 +415,12 @@ public class FilterIndexReader extends I
   
   @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

Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/SlowMultiReaderWrapper.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/SlowMultiReaderWrapper.java?rev=1036977&r1=1036976&r2=1036977&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/SlowMultiReaderWrapper.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/SlowMultiReaderWrapper.java Fri
Nov 19 18:49:54 2010
@@ -82,4 +82,9 @@ public final class SlowMultiReaderWrappe
   public void doClose() throws IOException {
     throw new UnsupportedOperationException("please call close on the original reader instead");
   }
+
+  @Override
+  public IndexReader[] getSequentialSubReaders() {
+    return null;
+  } 
 }

Modified: lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestFilterIndexReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestFilterIndexReader.java?rev=1036977&r1=1036976&r2=1036977&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestFilterIndexReader.java (original)
+++ lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestFilterIndexReader.java Fri
Nov 19 18:49:54 2010
@@ -149,7 +149,7 @@ public class TestFilterIndexReader exten
     //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();



Mime
View raw message