lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From busc...@apache.org
Subject svn commit: r822913 - in /lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/search: JustCompileSearch.java TestCachingWrapperFilter.java
Date Wed, 07 Oct 2009 21:03:02 GMT
Author: buschmi
Date: Wed Oct  7 21:02:55 2009
New Revision: 822913

URL: http://svn.apache.org/viewvc?rev=822913&view=rev
Log:
LUCENE-1957: Remove Filter.bits(IndexReader) method.

Modified:
    lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/search/JustCompileSearch.java
    lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestCachingWrapperFilter.java

Modified: lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/search/JustCompileSearch.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/search/JustCompileSearch.java?rev=822913&r1=822912&r2=822913&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/search/JustCompileSearch.java
(original)
+++ lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/search/JustCompileSearch.java
Wed Oct  7 21:02:55 2009
@@ -244,6 +244,11 @@
   static final class JustCompileFilter extends Filter {
     // Filter is just an abstract class with no abstract methods. However it is
     // still added here in case someone will add abstract methods in the future.
+    
+    @Override
+    public DocIdSet getDocIdSet(IndexReader reader) throws IOException {
+      return null;
+    }
   }
 
   static final class JustCompileFilteredDocIdSet extends FilteredDocIdSet {
@@ -396,6 +401,10 @@
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
     
+    @Override
+    public DocIdSet getDocIdSet(IndexReader reader) throws IOException {
+      return null;
+    }    
   }
 
   static final class JustCompileTopDocsCollector extends TopDocsCollector {

Modified: lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestCachingWrapperFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestCachingWrapperFilter.java?rev=822913&r1=822912&r2=822913&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestCachingWrapperFilter.java
(original)
+++ lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/search/TestCachingWrapperFilter.java
Wed Oct  7 21:02:55 2009
@@ -17,18 +17,17 @@
  * limitations under the License.
  */
 
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.OpenBitSet;
-import org.apache.lucene.util.OpenBitSetDISI;
-import org.apache.lucene.store.Directory;
-import org.apache.lucene.store.RAMDirectory;
+import java.io.IOException;
+
+import org.apache.lucene.analysis.standard.StandardAnalyzer;
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.IndexWriter;
 import org.apache.lucene.index.Term;
-import org.apache.lucene.analysis.standard.StandardAnalyzer;
-
-import java.io.IOException;
-import java.util.BitSet;
+import org.apache.lucene.store.Directory;
+import org.apache.lucene.store.RAMDirectory;
+import org.apache.lucene.util.LuceneTestCase;
+import org.apache.lucene.util.OpenBitSet;
+import org.apache.lucene.util.OpenBitSetDISI;
 
 public class TestCachingWrapperFilter extends LuceneTestCase {
   public void testCachingWorks() throws Exception {
@@ -45,8 +44,7 @@
     cacher.getDocIdSet(reader);
     assertTrue("first time", filter.wasCalled());
 
-    // make sure no exception if cache is holding the wrong bitset
-    cacher.bits(reader);
+    // make sure no exception if cache is holding the wrong docIdSet
     cacher.getDocIdSet(reader);
 
     // second time, nested filter should not be called
@@ -90,12 +88,6 @@
         return new OpenBitSet();
       }
     }, true);
-    // a deprecated filter is always cacheable
-    assertDocIdSetCacheable(reader, new Filter() {
-      public BitSet bits(IndexReader reader) {
-        return new BitSet();
-      }
-    }, true);
 
     reader.close();
   }



Mime
View raw message