lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpou...@apache.org
Subject svn commit: r1662082 [1/5] - in /lucene/dev/branches/branch_5x: ./ lucene/ lucene/analysis/ lucene/analysis/common/src/test/org/apache/lucene/analysis/shingle/ lucene/backward-codecs/ lucene/backward-codecs/src/test/org/apache/lucene/index/ lucene/benc...
Date Tue, 24 Feb 2015 18:50:18 GMT
Author: jpountz
Date: Tue Feb 24 18:50:15 2015
New Revision: 1662082

URL: http://svn.apache.org/r1662082
Log:
LUCENE-6286: Removed IndexSearcher methods that take a Filter object.

Modified:
    lucene/dev/branches/branch_5x/   (props changed)
    lucene/dev/branches/branch_5x/lucene/   (props changed)
    lucene/dev/branches/branch_5x/lucene/CHANGES.txt   (contents, props changed)
    lucene/dev/branches/branch_5x/lucene/analysis/   (props changed)
    lucene/dev/branches/branch_5x/lucene/analysis/common/src/test/org/apache/lucene/analysis/shingle/ShingleAnalyzerWrapperTest.java
    lucene/dev/branches/branch_5x/lucene/backward-codecs/   (props changed)
    lucene/dev/branches/branch_5x/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
    lucene/dev/branches/branch_5x/lucene/benchmark/   (props changed)
    lucene/dev/branches/branch_5x/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTask.java
    lucene/dev/branches/branch_5x/lucene/benchmark/src/java/org/apache/lucene/benchmark/quality/QualityBenchmark.java
    lucene/dev/branches/branch_5x/lucene/core/   (props changed)
    lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/search/FieldDoc.java
    lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/search/FieldValueHitQueue.java
    lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java
    lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/search/TopDocs.java
    lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/search/TopFieldDocs.java
    lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/search/package-info.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/TestDemo.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/TestSearch.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/TestSearchForDuplicates.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/codecs/perfield/TestPerFieldDocValuesFormat.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/document/TestDocument.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestCodecs.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestDeletionPolicy.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestDirectoryReaderReopen.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterCommit.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterDelete.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterMaxDocs.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOnDiskFull.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestLazyProxSkipping.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestManyFields.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestParallelCompositeReader.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestParallelLeafReader.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestBoolean2.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestBooleanMinShouldMatch.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestBooleanOr.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestBooleanScorer.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestCachingWrapperFilter.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestConstantScoreQuery.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestCustomSearcherSort.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestDateFilter.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestDateSort.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestDisjunctionMaxQuery.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestDocIdSet.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestElevationComparator.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestFieldCacheTermsFilter.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestFilteredQuery.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestFilteredSearch.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestFuzzyQuery.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestMatchAllDocsQuery.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestMultiPhraseQuery.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestMultiTermConstantScore.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestNeedsScores.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestNot.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestNumericRangeQuery32.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestNumericRangeQuery64.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestPhrasePrefixQuery.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestPhraseQuery.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestPositionIncrement.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestPrefixFilter.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestPrefixInBooleanQuery.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestPrefixQuery.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestQueryWrapperFilter.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestSearchAfter.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestSortRandom.java   (contents, props changed)
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestSortedNumericSortField.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestSortedSetSortField.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestSubScorerFreqs.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestTermRangeFilter.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestTermRangeQuery.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestTimeLimitingCollector.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestTotalHitCountCollector.java   (contents, props changed)
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestWildcard.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/payloads/TestPayloadNearQuery.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/payloads/TestPayloadTermQuery.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/spans/TestSpansAdvanced.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/store/TestBufferedIndexInput.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/store/TestLockFactory.java
    lucene/dev/branches/branch_5x/lucene/demo/   (props changed)
    lucene/dev/branches/branch_5x/lucene/demo/src/java/org/apache/lucene/demo/SearchFiles.java
    lucene/dev/branches/branch_5x/lucene/demo/src/java/org/apache/lucene/demo/facet/SimpleFacetsExample.java
    lucene/dev/branches/branch_5x/lucene/expressions/   (props changed)
    lucene/dev/branches/branch_5x/lucene/expressions/src/test/org/apache/lucene/expressions/TestDemoExpressions.java
    lucene/dev/branches/branch_5x/lucene/expressions/src/test/org/apache/lucene/expressions/TestExpressionSorts.java
    lucene/dev/branches/branch_5x/lucene/facet/   (props changed)
    lucene/dev/branches/branch_5x/lucene/facet/src/test/org/apache/lucene/facet/TestDrillSideways.java
    lucene/dev/branches/branch_5x/lucene/grouping/   (props changed)
    lucene/dev/branches/branch_5x/lucene/grouping/src/java/org/apache/lucene/search/grouping/GroupingSearch.java
    lucene/dev/branches/branch_5x/lucene/grouping/src/test/org/apache/lucene/search/grouping/GroupingSearchTest.java
    lucene/dev/branches/branch_5x/lucene/highlighter/   (props changed)
    lucene/dev/branches/branch_5x/lucene/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterTest.java
    lucene/dev/branches/branch_5x/lucene/highlighter/src/test/org/apache/lucene/search/postingshighlight/TestMultiTermHighlighting.java
    lucene/dev/branches/branch_5x/lucene/highlighter/src/test/org/apache/lucene/search/postingshighlight/TestPostingsHighlighter.java
    lucene/dev/branches/branch_5x/lucene/highlighter/src/test/org/apache/lucene/search/postingshighlight/TestPostingsHighlighterRanking.java
    lucene/dev/branches/branch_5x/lucene/join/   (props changed)
    lucene/dev/branches/branch_5x/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoin.java
    lucene/dev/branches/branch_5x/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoinValidation.java
    lucene/dev/branches/branch_5x/lucene/misc/   (props changed)
    lucene/dev/branches/branch_5x/lucene/misc/src/test/org/apache/lucene/uninverting/TestFieldCacheSort.java
    lucene/dev/branches/branch_5x/lucene/misc/src/test/org/apache/lucene/uninverting/TestFieldCacheSortRandom.java
    lucene/dev/branches/branch_5x/lucene/misc/src/test/org/apache/lucene/uninverting/TestNumericTerms32.java
    lucene/dev/branches/branch_5x/lucene/misc/src/test/org/apache/lucene/uninverting/TestNumericTerms64.java
    lucene/dev/branches/branch_5x/lucene/queries/   (props changed)
    lucene/dev/branches/branch_5x/lucene/queries/src/test/org/apache/lucene/queries/TestCustomScoreQuery.java
    lucene/dev/branches/branch_5x/lucene/queries/src/test/org/apache/lucene/queries/function/TestFieldScoreQuery.java
    lucene/dev/branches/branch_5x/lucene/queries/src/test/org/apache/lucene/queries/function/TestValueSources.java
    lucene/dev/branches/branch_5x/lucene/queryparser/   (props changed)
    lucene/dev/branches/branch_5x/lucene/queryparser/src/test/org/apache/lucene/queryparser/classic/TestMultiFieldQueryParser.java
    lucene/dev/branches/branch_5x/lucene/queryparser/src/test/org/apache/lucene/queryparser/flexible/standard/TestMultiFieldQPHelper.java
    lucene/dev/branches/branch_5x/lucene/queryparser/src/test/org/apache/lucene/queryparser/flexible/standard/TestQPHelper.java
    lucene/dev/branches/branch_5x/lucene/queryparser/src/test/org/apache/lucene/queryparser/util/QueryParserTestBase.java
    lucene/dev/branches/branch_5x/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/TestParser.java
    lucene/dev/branches/branch_5x/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/TestQueryTemplateManager.java
    lucene/dev/branches/branch_5x/lucene/sandbox/   (props changed)
    lucene/dev/branches/branch_5x/lucene/sandbox/src/test/org/apache/lucene/sandbox/queries/DuplicateFilterTest.java
    lucene/dev/branches/branch_5x/lucene/sandbox/src/test/org/apache/lucene/sandbox/queries/TestSlowFuzzyQuery.java
    lucene/dev/branches/branch_5x/lucene/sandbox/src/test/org/apache/lucene/sandbox/queries/regex/TestRegexQuery.java
    lucene/dev/branches/branch_5x/lucene/sandbox/src/test/org/apache/lucene/sandbox/queries/regex/TestSpanRegexQuery.java
    lucene/dev/branches/branch_5x/lucene/sandbox/src/test/org/apache/lucene/search/TestTermAutomatonQuery.java
    lucene/dev/branches/branch_5x/lucene/spatial/   (props changed)
    lucene/dev/branches/branch_5x/lucene/spatial/src/test/org/apache/lucene/spatial/SpatialExample.java
    lucene/dev/branches/branch_5x/lucene/spatial/src/test/org/apache/lucene/spatial/prefix/HeatmapFacetCounterTest.java
    lucene/dev/branches/branch_5x/lucene/suggest/   (props changed)
    lucene/dev/branches/branch_5x/lucene/suggest/src/java/org/apache/lucene/search/spell/SpellChecker.java
    lucene/dev/branches/branch_5x/lucene/test-framework/   (props changed)
    lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/analysis/CollationTestBase.java
    lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/index/BaseDocValuesFormatTestCase.java
    lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/index/ThreadedIndexingAndSearchingTestCase.java
    lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/search/AssertingIndexSearcher.java
    lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/search/CheckHits.java
    lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/search/SearchEquivalenceTestBase.java
    lucene/dev/branches/branch_5x/solr/   (props changed)
    lucene/dev/branches/branch_5x/solr/contrib/   (props changed)
    lucene/dev/branches/branch_5x/solr/contrib/analytics/src/java/org/apache/solr/analytics/accumulator/FacetingAccumulator.java
    lucene/dev/branches/branch_5x/solr/core/   (props changed)
    lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/BlobHandler.java
    lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/component/ExpandComponent.java
    lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/request/SimpleFacets.java
    lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/Grouping.java
    lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/LuceneQueryOptimizer.java
    lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java
    lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/grouping/CommandHandler.java
    lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/search/TestSort.java
    lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/search/function/TestOrdValues.java

Modified: lucene/dev/branches/branch_5x/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/CHANGES.txt?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/CHANGES.txt (original)
+++ lucene/dev/branches/branch_5x/lucene/CHANGES.txt Tue Feb 24 18:50:15 2015
@@ -124,6 +124,9 @@ API Changes
   performance would be achieved through CollationKeyAnalyzer or
   ICUCollationKeyAnalyzer. (Adrien Grand)
 
+* LUCENE-6286: Removed IndexSearcher methods that take a Filter object.
+  A BooleanQuery with a filter clause must be used instead. (Adrien Grand)
+
 Other
 
 * LUCENE-6248: Remove unused odd constants from StandardSyntaxParser.jj

Modified: lucene/dev/branches/branch_5x/lucene/analysis/common/src/test/org/apache/lucene/analysis/shingle/ShingleAnalyzerWrapperTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/analysis/common/src/test/org/apache/lucene/analysis/shingle/ShingleAnalyzerWrapperTest.java?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/analysis/common/src/test/org/apache/lucene/analysis/shingle/ShingleAnalyzerWrapperTest.java (original)
+++ lucene/dev/branches/branch_5x/lucene/analysis/common/src/test/org/apache/lucene/analysis/shingle/ShingleAnalyzerWrapperTest.java Tue Feb 24 18:50:15 2015
@@ -114,7 +114,7 @@ public class ShingleAnalyzerWrapperTest
       ts.end();
     }
 
-    ScoreDoc[] hits = searcher.search(q, null, 1000).scoreDocs;
+    ScoreDoc[] hits = searcher.search(q, 1000).scoreDocs;
     int[] ranks = new int[] { 0 };
     compareRanks(hits, ranks);
   }
@@ -139,7 +139,7 @@ public class ShingleAnalyzerWrapperTest
       ts.end();
     }
 
-    ScoreDoc[] hits = searcher.search(q, null, 1000).scoreDocs;
+    ScoreDoc[] hits = searcher.search(q, 1000).scoreDocs;
     int[] ranks = new int[] { 1, 2, 0 };
     compareRanks(hits, ranks);
   }

Modified: lucene/dev/branches/branch_5x/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java (original)
+++ lucene/dev/branches/branch_5x/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java Tue Feb 24 18:50:15 2015
@@ -713,7 +713,7 @@ public class TestBackwardsCompatibility
       }
     }
     
-    ScoreDoc[] hits = searcher.search(new TermQuery(new Term(new String("content"), "aaa")), null, 1000).scoreDocs;
+    ScoreDoc[] hits = searcher.search(new TermQuery(new Term(new String("content"), "aaa")), 1000).scoreDocs;
 
     // First document should be #0
     Document d = searcher.getIndexReader().document(hits[0].doc);
@@ -722,20 +722,20 @@ public class TestBackwardsCompatibility
     doTestHits(hits, 34, searcher.getIndexReader());
     
     if (is40Index) {
-      hits = searcher.search(new TermQuery(new Term(new String("content5"), "aaa")), null, 1000).scoreDocs;
+      hits = searcher.search(new TermQuery(new Term(new String("content5"), "aaa")), 1000).scoreDocs;
 
       doTestHits(hits, 34, searcher.getIndexReader());
     
-      hits = searcher.search(new TermQuery(new Term(new String("content6"), "aaa")), null, 1000).scoreDocs;
+      hits = searcher.search(new TermQuery(new Term(new String("content6"), "aaa")), 1000).scoreDocs;
 
       doTestHits(hits, 34, searcher.getIndexReader());
     }
 
-    hits = searcher.search(new TermQuery(new Term("utf8", "\u0000")), null, 1000).scoreDocs;
+    hits = searcher.search(new TermQuery(new Term("utf8", "\u0000")), 1000).scoreDocs;
     assertEquals(34, hits.length);
-    hits = searcher.search(new TermQuery(new Term(new String("utf8"), "lu\uD834\uDD1Ece\uD834\uDD60ne")), null, 1000).scoreDocs;
+    hits = searcher.search(new TermQuery(new Term(new String("utf8"), "lu\uD834\uDD1Ece\uD834\uDD60ne")), 1000).scoreDocs;
     assertEquals(34, hits.length);
-    hits = searcher.search(new TermQuery(new Term("utf8", "ab\ud917\udc17cd")), null, 1000).scoreDocs;
+    hits = searcher.search(new TermQuery(new Term("utf8", "ab\ud917\udc17cd")), 1000).scoreDocs;
     assertEquals(34, hits.length);
 
     reader.close();
@@ -759,7 +759,7 @@ public class TestBackwardsCompatibility
     // make sure searching sees right # hits
     IndexReader reader = DirectoryReader.open(dir);
     IndexSearcher searcher = newSearcher(reader);
-    ScoreDoc[] hits = searcher.search(new TermQuery(new Term("content", "aaa")), null, 1000).scoreDocs;
+    ScoreDoc[] hits = searcher.search(new TermQuery(new Term("content", "aaa")), 1000).scoreDocs;
     Document d = searcher.getIndexReader().document(hits[0].doc);
     assertEquals("wrong first document", "0", d.get("id"));
     doTestHits(hits, 44, searcher.getIndexReader());
@@ -774,7 +774,7 @@ public class TestBackwardsCompatibility
 
     reader = DirectoryReader.open(dir);
     searcher = newSearcher(reader);
-    hits = searcher.search(new TermQuery(new Term("content", "aaa")), null, 1000).scoreDocs;
+    hits = searcher.search(new TermQuery(new Term("content", "aaa")), 1000).scoreDocs;
     assertEquals("wrong number of hits", 44, hits.length);
     d = searcher.doc(hits[0].doc);
     doTestHits(hits, 44, searcher.getIndexReader());
@@ -786,7 +786,7 @@ public class TestBackwardsCompatibility
     // make sure searching sees right # hits
     DirectoryReader reader = DirectoryReader.open(dir);
     IndexSearcher searcher = newSearcher(reader);
-    ScoreDoc[] hits = searcher.search(new TermQuery(new Term("content", "aaa")), null, 1000).scoreDocs;
+    ScoreDoc[] hits = searcher.search(new TermQuery(new Term("content", "aaa")), 1000).scoreDocs;
     assertEquals("wrong number of hits", 34, hits.length);
     Document d = searcher.doc(hits[0].doc);
     assertEquals("wrong first document", "0", d.get("id"));
@@ -800,7 +800,7 @@ public class TestBackwardsCompatibility
 
     reader = DirectoryReader.open(dir);
     searcher = newSearcher(reader);
-    hits = searcher.search(new TermQuery(new Term("content", "aaa")), null, 1000).scoreDocs;
+    hits = searcher.search(new TermQuery(new Term("content", "aaa")), 1000).scoreDocs;
     assertEquals("wrong number of hits", 34, hits.length);
     doTestHits(hits, 34, searcher.getIndexReader());
     reader.close();

Modified: lucene/dev/branches/branch_5x/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTask.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTask.java?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTask.java (original)
+++ lucene/dev/branches/branch_5x/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTask.java Tue Feb 24 18:50:15 2015
@@ -122,14 +122,14 @@ public abstract class ReadTask extends P
             TopFieldCollector collector = TopFieldCollector.create(sort, numHits,
                                                                    true, withScore(),
                                                                    withMaxScore());
-            searcher.search(q, null, collector);
+            searcher.search(q, collector);
             hits = collector.topDocs();
           } else {
             hits = searcher.search(q, numHits);
           }
         } else {
           Collector collector = createCollector();
-          searcher.search(q, null, collector);
+          searcher.search(q, collector);
           //hits = collector.topDocs();
         }
 

Modified: lucene/dev/branches/branch_5x/lucene/benchmark/src/java/org/apache/lucene/benchmark/quality/QualityBenchmark.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/benchmark/src/java/org/apache/lucene/benchmark/quality/QualityBenchmark.java?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/benchmark/src/java/org/apache/lucene/benchmark/quality/QualityBenchmark.java (original)
+++ lucene/dev/branches/branch_5x/lucene/benchmark/src/java/org/apache/lucene/benchmark/quality/QualityBenchmark.java Tue Feb 24 18:50:15 2015
@@ -94,7 +94,7 @@ public class QualityBenchmark {
       Query q = qqParser.parse(qq);
       // search with this query 
       long t1 = System.currentTimeMillis();
-      TopDocs td = searcher.search(q,null,maxResults);
+      TopDocs td = searcher.search(q,maxResults);
       long searchTime = System.currentTimeMillis()-t1;
       //most likely we either submit or judge, but check both 
       if (judge!=null) {

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/search/FieldDoc.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/search/FieldDoc.java?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/search/FieldDoc.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/search/FieldDoc.java Tue Feb 24 18:50:15 2015
@@ -46,7 +46,7 @@ public class FieldDoc extends ScoreDoc {
    * the <code>value</code> method corresponding
    * FieldComparator used to sort this field.
    * @see Sort
-   * @see IndexSearcher#search(Query,Filter,int,Sort)
+   * @see IndexSearcher#search(Query,int,Sort)
    */
   public Object[] fields;
 

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/search/FieldValueHitQueue.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/search/FieldValueHitQueue.java?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/search/FieldValueHitQueue.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/search/FieldValueHitQueue.java Tue Feb 24 18:50:15 2015
@@ -27,7 +27,7 @@ import org.apache.lucene.util.PriorityQu
  * 
  * @lucene.experimental
  * @since 2.9
- * @see IndexSearcher#search(Query,Filter,int,Sort)
+ * @see IndexSearcher#search(Query,int,Sort)
  */
 public abstract class FieldValueHitQueue<T extends FieldValueHitQueue.Entry> extends PriorityQueue<T> {
 
@@ -202,7 +202,7 @@ public abstract class FieldValueHitQueue
    * 
    * @param entry The Entry used to create a FieldDoc
    * @return The newly created FieldDoc
-   * @see IndexSearcher#search(Query,Filter,int,Sort)
+   * @see IndexSearcher#search(Query,int,Sort)
    */
   FieldDoc fillFields(final Entry entry) {
     final int n = comparators.length;

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java Tue Feb 24 18:50:15 2015
@@ -210,7 +210,10 @@ public class IndexSearcher {
     return similarity;
   }
   
-  /** @lucene.internal */
+  /** @lucene.internal
+   *  @deprecated Use {@link BooleanQuery boolean queries} with
+   *              {@link BooleanClause.Occur#FILTER} clauses instead */
+  @Deprecated
   protected Query wrapFilter(Query query, Filter filter) {
     return (filter == null) ? query : new FilteredQuery(query, filter);
   }
@@ -285,8 +288,11 @@ public class IndexSearcher {
    *
    * @throws BooleanQuery.TooManyClauses If a query would exceed 
    *         {@link BooleanQuery#getMaxClauseCount()} clauses.
+   * @deprecated Use {@link BooleanQuery boolean queries} with
+   *              {@link BooleanClause.Occur#FILTER} clauses instead
    */
-  public TopDocs searchAfter(ScoreDoc after, Query query, Filter filter, int n) throws IOException {
+  @Deprecated
+  public final TopDocs searchAfter(ScoreDoc after, Query query, Filter filter, int n) throws IOException {
     return searchAfter(after, wrapFilter(query, filter), n);
   }
   
@@ -307,8 +313,11 @@ public class IndexSearcher {
    *
    * @throws BooleanQuery.TooManyClauses If a query would exceed 
    *         {@link BooleanQuery#getMaxClauseCount()} clauses.
+   * @deprecated Use {@link BooleanQuery boolean queries} with
+   *              {@link BooleanClause.Occur#FILTER} clauses instead
    */
-  public TopDocs search(Query query, Filter filter, int n)
+  @Deprecated
+  public final TopDocs search(Query query, Filter filter, int n)
     throws IOException {
     return search(wrapFilter(query, filter), n);
   }
@@ -323,8 +332,11 @@ public class IndexSearcher {
    * @param results to receive hits
    * @throws BooleanQuery.TooManyClauses If a query would exceed 
    *         {@link BooleanQuery#getMaxClauseCount()} clauses.
+   * @deprecated Use {@link BooleanQuery boolean queries} with
+   *              {@link BooleanClause.Occur#FILTER} clauses instead
    */
-  public void search(Query query, Filter filter, Collector results)
+  @Deprecated
+  public final void search(Query query, Filter filter, Collector results)
     throws IOException {
     search(wrapFilter(query, filter), results);
   }
@@ -352,8 +364,11 @@ public class IndexSearcher {
    *
    * @throws BooleanQuery.TooManyClauses If a query would exceed 
    *         {@link BooleanQuery#getMaxClauseCount()} clauses.
+   * @deprecated Use {@link BooleanQuery boolean queries} with
+   *              {@link BooleanClause.Occur#FILTER} clauses instead
    */
-  public TopFieldDocs search(Query query, Filter filter, int n,
+  @Deprecated
+  public final TopFieldDocs search(Query query, Filter filter, int n,
                              Sort sort) throws IOException {
     return search(query, filter, n, sort, false, false);
   }
@@ -371,12 +386,34 @@ public class IndexSearcher {
    * 
    * @throws BooleanQuery.TooManyClauses If a query would exceed 
    *         {@link BooleanQuery#getMaxClauseCount()} clauses.
+   * @deprecated Use {@link BooleanQuery boolean queries} with
+   *              {@link BooleanClause.Occur#FILTER} clauses instead
    */
-  public TopFieldDocs search(Query query, Filter filter, int n,
+  @Deprecated
+  public final TopFieldDocs search(Query query, Filter filter, int n,
                              Sort sort, boolean doDocScores, boolean doMaxScore) throws IOException {
     return searchAfter(null, query, filter, n, sort, doDocScores, doMaxScore);
   }
 
+  /** Search implementation with arbitrary sorting, plus
+   * control over whether hit scores and max score
+   * should be computed.  Finds
+   * the top <code>n</code> hits for <code>query</code>, applying
+   * <code>filter</code> if non-null, and sorting the hits by the criteria in
+   * <code>sort</code>.  If <code>doDocScores</code> is <code>true</code>
+   * then the score of each hit will be computed and
+   * returned.  If <code>doMaxScore</code> is
+   * <code>true</code> then the maximum score over all
+   * collected hits will be computed.
+   * 
+   * @throws BooleanQuery.TooManyClauses If a query would exceed 
+   *         {@link BooleanQuery#getMaxClauseCount()} clauses.
+   */
+  public final TopFieldDocs search(Query query, int n,
+                             Sort sort, boolean doDocScores, boolean doMaxScore) throws IOException {
+    return searchAfter(null, query, n, sort, doDocScores, doMaxScore);
+  }
+
   /** Finds the top <code>n</code>
    * hits for <code>query</code>, applying <code>filter</code> if non-null,
    * where all results are after a previous result (<code>after</code>).
@@ -387,8 +424,11 @@ public class IndexSearcher {
    *
    * @throws BooleanQuery.TooManyClauses If a query would exceed 
    *         {@link BooleanQuery#getMaxClauseCount()} clauses.
+   * @deprecated Use {@link BooleanQuery boolean queries} with
+   *              {@link BooleanClause.Occur#FILTER} clauses instead
    */
-  public TopFieldDocs searchAfter(ScoreDoc after, Query query, Filter filter, int n, Sort sort) throws IOException {
+  @Deprecated
+  public final TopFieldDocs searchAfter(ScoreDoc after, Query query, Filter filter, int n, Sort sort) throws IOException {
     return searchAfter(after, query, filter, n, sort, false, false);
   }
 
@@ -435,8 +475,11 @@ public class IndexSearcher {
    *
    * @throws BooleanQuery.TooManyClauses If a query would exceed 
    *         {@link BooleanQuery#getMaxClauseCount()} clauses.
+   * @deprecated Use {@link BooleanQuery boolean queries} with
+   *              {@link BooleanClause.Occur#FILTER} clauses instead
    */
-  public TopFieldDocs searchAfter(ScoreDoc after, Query query, Filter filter, int numHits, Sort sort,
+  @Deprecated
+  public final TopFieldDocs searchAfter(ScoreDoc after, Query query, Filter filter, int numHits, Sort sort,
       boolean doDocScores, boolean doMaxScore) throws IOException {
     if (after != null && !(after instanceof FieldDoc)) {
       // TODO: if we fix type safety of TopFieldDocs we can
@@ -446,6 +489,32 @@ public class IndexSearcher {
     return searchAfter((FieldDoc) after, wrapFilter(query, filter), numHits, sort, doDocScores, doMaxScore);
   }
 
+  /** Finds the top <code>n</code>
+   * hits for <code>query</code> where all results are after a previous 
+   * result (<code>after</code>), allowing control over
+   * whether hit scores and max score should be computed.
+   * <p>
+   * By passing the bottom result from a previous page as <code>after</code>,
+   * this method can be used for efficient 'deep-paging' across potentially
+   * large result sets.  If <code>doDocScores</code> is <code>true</code>
+   * then the score of each hit will be computed and
+   * returned.  If <code>doMaxScore</code> is
+   * <code>true</code> then the maximum score over all
+   * collected hits will be computed.
+   *
+   * @throws BooleanQuery.TooManyClauses If a query would exceed 
+   *         {@link BooleanQuery#getMaxClauseCount()} clauses.
+   */
+  public final TopFieldDocs searchAfter(ScoreDoc after, Query query, int numHits, Sort sort,
+      boolean doDocScores, boolean doMaxScore) throws IOException {
+    if (after != null && !(after instanceof FieldDoc)) {
+      // TODO: if we fix type safety of TopFieldDocs we can
+      // remove this
+      throw new IllegalArgumentException("after must be a FieldDoc; got " + after);
+    }
+    return searchAfter((FieldDoc) after, query, numHits, sort, doDocScores, doMaxScore);
+  }
+
   private TopFieldDocs searchAfter(FieldDoc after, Query query, int numHits, Sort sort,
       boolean doDocScores, boolean doMaxScore) throws IOException {
     final int limit = Math.max(1, reader.maxDoc());

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/search/TopDocs.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/search/TopDocs.java?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/search/TopDocs.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/search/TopDocs.java Tue Feb 24 18:50:15 2015
@@ -22,7 +22,6 @@ import org.apache.lucene.util.PriorityQu
 import java.io.IOException;
 
 /** Represents hits returned by {@link
- * IndexSearcher#search(Query,Filter,int)} and {@link
  * IndexSearcher#search(Query,int)}. */
 public class TopDocs {
 

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/search/TopFieldDocs.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/search/TopFieldDocs.java?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/search/TopFieldDocs.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/search/TopFieldDocs.java Tue Feb 24 18:50:15 2015
@@ -19,7 +19,7 @@ package org.apache.lucene.search;
 
 
 /** Represents hits returned by {@link
- * IndexSearcher#search(Query,Filter,int,Sort)}.
+ * IndexSearcher#search(Query,int,Sort)}.
  */
 public class TopFieldDocs extends TopDocs {
 

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/search/package-info.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/search/package-info.java?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/search/package-info.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/search/package-info.java Tue Feb 24 18:50:15 2015
@@ -40,8 +40,7 @@
  * on implementing your own Query class, see <a href="#customQueriesExpert">Custom Queries -- Expert Level</a> below.
  * <p>
  * To perform a search, applications usually call {@link
- * org.apache.lucene.search.IndexSearcher#search(Query,int)} or {@link
- * org.apache.lucene.search.IndexSearcher#search(Query,Filter,int)}.
+ * org.apache.lucene.search.IndexSearcher#search(Query,int)}.
  * <p>
  * Once a Query has been created and submitted to the {@link org.apache.lucene.search.IndexSearcher IndexSearcher}, the scoring
  * process begins. After some infrastructure setup, control finally passes to the {@link org.apache.lucene.search.Weight Weight}

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/TestDemo.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/TestDemo.java?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/TestDemo.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/TestDemo.java Tue Feb 24 18:50:15 2015
@@ -60,7 +60,7 @@ public class TestDemo extends LuceneTest
 
     assertEquals(1, isearcher.search(new TermQuery(new Term("fieldname", longTerm)), 1).totalHits);
     Query query = new TermQuery(new Term("fieldname", "text"));
-    TopDocs hits = isearcher.search(query, null, 1);
+    TopDocs hits = isearcher.search(query, 1);
     assertEquals(1, hits.totalHits);
     // Iterate through the results:
     for (int i = 0; i < hits.scoreDocs.length; i++) {
@@ -72,7 +72,7 @@ public class TestDemo extends LuceneTest
     PhraseQuery phraseQuery = new PhraseQuery();
     phraseQuery.add(new Term("fieldname", "to"));
     phraseQuery.add(new Term("fieldname", "be"));
-    assertEquals(1, isearcher.search(phraseQuery, null, 1).totalHits);
+    assertEquals(1, isearcher.search(phraseQuery, 1).totalHits);
 
     ireader.close();
     directory.close();

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/TestSearch.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/TestSearch.java?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/TestSearch.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/TestSearch.java Tue Feb 24 18:50:15 2015
@@ -57,7 +57,7 @@ public class TestSearch extends LuceneTe
       try {
         IndexSearcher searcher = newSearcher(reader);
         
-        ScoreDoc[] hits = searcher.search(q, null, 1000).scoreDocs;
+        ScoreDoc[] hits = searcher.search(q, 1000).scoreDocs;
         assertEquals(1, hits.length);
         assertTrue("score is not negative: " + hits[0].score,
                    hits[0].score < 0);
@@ -147,7 +147,7 @@ public class TestSearch extends LuceneTe
           System.out.println("TEST: query=" + query);
         }
 
-        hits = searcher.search(query, null, 1000, sort).scoreDocs;
+        hits = searcher.search(query, 1000, sort).scoreDocs;
 
         out.println(hits.length + " total results");
         for (int i = 0 ; i < hits.length && i < 10; i++) {

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/TestSearchForDuplicates.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/TestSearchForDuplicates.java?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/TestSearchForDuplicates.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/TestSearchForDuplicates.java Tue Feb 24 18:50:15 2015
@@ -116,7 +116,7 @@ public class TestSearchForDuplicates ext
       final Sort sort = new Sort(SortField.FIELD_SCORE,
                                  new SortField(ID_FIELD, SortField.Type.INT));
 
-      ScoreDoc[] hits = searcher.search(query, null, MAX_DOCS, sort).scoreDocs;
+      ScoreDoc[] hits = searcher.search(query, MAX_DOCS, sort).scoreDocs;
       printHits(out, hits, searcher);
       checkHits(hits, MAX_DOCS, searcher);
 
@@ -129,7 +129,7 @@ public class TestSearchForDuplicates ext
       booleanQuery.add(new TermQuery(new Term(PRIORITY_FIELD, MED_PRIORITY)), BooleanClause.Occur.SHOULD);
       out.println("Query: " + booleanQuery.toString(PRIORITY_FIELD));
 
-      hits = searcher.search(booleanQuery, null, MAX_DOCS, sort).scoreDocs;
+      hits = searcher.search(booleanQuery, MAX_DOCS, sort).scoreDocs;
       printHits(out, hits, searcher);
       checkHits(hits, MAX_DOCS, searcher);
 

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/codecs/perfield/TestPerFieldDocValuesFormat.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/codecs/perfield/TestPerFieldDocValuesFormat.java?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/codecs/perfield/TestPerFieldDocValuesFormat.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/codecs/perfield/TestPerFieldDocValuesFormat.java Tue Feb 24 18:50:15 2015
@@ -106,7 +106,7 @@ public class TestPerFieldDocValuesFormat
 
     assertEquals(1, isearcher.search(new TermQuery(new Term("fieldname", longTerm)), 1).totalHits);
     Query query = new TermQuery(new Term("fieldname", "text"));
-    TopDocs hits = isearcher.search(query, null, 1);
+    TopDocs hits = isearcher.search(query, 1);
     assertEquals(1, hits.totalHits);
     // Iterate through the results:
     for (int i = 0; i < hits.scoreDocs.length; i++) {

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/document/TestDocument.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/document/TestDocument.java?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/document/TestDocument.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/document/TestDocument.java Tue Feb 24 18:50:15 2015
@@ -192,7 +192,7 @@ public class TestDocument extends Lucene
     Query query = new TermQuery(new Term("keyword", "test1"));
     
     // ensure that queries return expected results without DateFilter first
-    ScoreDoc[] hits = searcher.search(query, null, 1000).scoreDocs;
+    ScoreDoc[] hits = searcher.search(query, 1000).scoreDocs;
     assertEquals(1, hits.length);
     
     doAssert(searcher.doc(hits[0].doc), true);
@@ -224,7 +224,7 @@ public class TestDocument extends Lucene
     query.add(new Term("indexed_not_tokenized", "test1"));
     query.add(new Term("indexed_not_tokenized", "test2"));
     
-    ScoreDoc[] hits = searcher.search(query, null, 1000).scoreDocs;
+    ScoreDoc[] hits = searcher.search(query, 1000).scoreDocs;
     assertEquals(1, hits.length);
     
     doAssert(searcher.doc(hits[0].doc), true);
@@ -303,7 +303,7 @@ public class TestDocument extends Lucene
     Query query = new TermQuery(new Term("keyword", "test"));
     
     // ensure that queries return expected results without DateFilter first
-    ScoreDoc[] hits = searcher.search(query, null, 1000).scoreDocs;
+    ScoreDoc[] hits = searcher.search(query, 1000).scoreDocs;
     assertEquals(3, hits.length);
     int result = 0;
     for (int i = 0; i < 3; i++) {

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestCodecs.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestCodecs.java?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestCodecs.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestCodecs.java Tue Feb 24 18:50:15 2015
@@ -304,17 +304,6 @@ public class TestCodecs extends LuceneTe
     dir.close();
   }
 
-  private ScoreDoc[] search(final IndexWriter writer, final Query q, final int n) throws IOException {
-    final IndexReader reader = writer.getReader();
-    final IndexSearcher searcher = newSearcher(reader);
-    try {
-      return searcher.search(q, null, n).scoreDocs;
-    }
-    finally {
-      reader.close();
-    }
-  }
-
   private class Verify extends Thread {
     final Fields termsDict;
     final FieldData[] fields;

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestDeletionPolicy.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestDeletionPolicy.java?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestDeletionPolicy.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestDeletionPolicy.java Tue Feb 24 18:50:15 2015
@@ -672,7 +672,7 @@ public class TestDeletionPolicy extends
         writer.close();
         IndexReader reader = DirectoryReader.open(dir);
         IndexSearcher searcher = newSearcher(reader);
-        ScoreDoc[] hits = searcher.search(query, null, 1000).scoreDocs;
+        ScoreDoc[] hits = searcher.search(query, 1000).scoreDocs;
         assertEquals(16, hits.length);
         reader.close();
 
@@ -690,7 +690,7 @@ public class TestDeletionPolicy extends
 
       IndexReader rwReader = DirectoryReader.open(dir);
       IndexSearcher searcher = newSearcher(rwReader);
-      ScoreDoc[] hits = searcher.search(query, null, 1000).scoreDocs;
+      ScoreDoc[] hits = searcher.search(query, 1000).scoreDocs;
       assertEquals(0, hits.length);
 
       // Simplistic check: just verify only the past N segments_N's still
@@ -708,7 +708,7 @@ public class TestDeletionPolicy extends
           // Work backwards in commits on what the expected
           // count should be.
           searcher = newSearcher(reader);
-          hits = searcher.search(query, null, 1000).scoreDocs;
+          hits = searcher.search(query, 1000).scoreDocs;
           assertEquals(expectedCount, hits.length);
           if (expectedCount == 0) {
             expectedCount = 16;

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestDirectoryReaderReopen.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestDirectoryReaderReopen.java?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestDirectoryReaderReopen.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestDirectoryReaderReopen.java Tue Feb 24 18:50:15 2015
@@ -272,7 +272,7 @@ public class TestDirectoryReaderReopen e
                 IndexSearcher searcher = newSearcher(refreshed);
                 ScoreDoc[] hits = searcher.search(
                     new TermQuery(new Term("field1", "a" + rnd.nextInt(refreshed.maxDoc()))),
-                    null, 1000).scoreDocs;
+                    1000).scoreDocs;
                 if (hits.length > 0) {
                   searcher.doc(hits[0].doc);
                 }

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java Tue Feb 24 18:50:15 2015
@@ -443,7 +443,7 @@ public class TestIndexWriter extends Luc
 
       IndexReader reader = DirectoryReader.open(dir);
       IndexSearcher searcher = newSearcher(reader);
-      ScoreDoc[] hits = searcher.search(new TermQuery(searchTerm), null, 1000).scoreDocs;
+      ScoreDoc[] hits = searcher.search(new TermQuery(searchTerm), 1000).scoreDocs;
       assertEquals(10, hits.length);
       reader.close();
 
@@ -465,7 +465,7 @@ public class TestIndexWriter extends Luc
       writer.close();
       reader = DirectoryReader.open(dir);
       searcher = newSearcher(reader);
-      hits = searcher.search(new TermQuery(searchTerm), null, 1000).scoreDocs;
+      hits = searcher.search(new TermQuery(searchTerm), 1000).scoreDocs;
       assertEquals(27, hits.length);
       reader.close();
 

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterCommit.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterCommit.java?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterCommit.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterCommit.java Tue Feb 24 18:50:15 2015
@@ -52,7 +52,7 @@ public class TestIndexWriterCommit exten
       Term searchTerm = new Term("content", "aaa");
       DirectoryReader reader = DirectoryReader.open(dir);
       IndexSearcher searcher = newSearcher(reader);
-      ScoreDoc[] hits = searcher.search(new TermQuery(searchTerm), null, 1000).scoreDocs;
+      ScoreDoc[] hits = searcher.search(new TermQuery(searchTerm), 1000).scoreDocs;
       assertEquals("first number of hits", 14, hits.length);
       reader.close();
 
@@ -65,7 +65,7 @@ public class TestIndexWriterCommit exten
         }
         IndexReader r = DirectoryReader.open(dir);
         searcher = newSearcher(r);
-        hits = searcher.search(new TermQuery(searchTerm), null, 1000).scoreDocs;
+        hits = searcher.search(new TermQuery(searchTerm), 1000).scoreDocs;
         assertEquals("reader incorrectly sees changes from writer", 14, hits.length);
         r.close();
         assertTrue("reader should have still been current", reader.isCurrent());
@@ -77,7 +77,7 @@ public class TestIndexWriterCommit exten
 
       IndexReader r = DirectoryReader.open(dir);
       searcher = newSearcher(r);
-      hits = searcher.search(new TermQuery(searchTerm), null, 1000).scoreDocs;
+      hits = searcher.search(new TermQuery(searchTerm), 1000).scoreDocs;
       assertEquals("reader did not see changes after writer was closed", 47, hits.length);
       r.close();
       reader.close();
@@ -108,7 +108,7 @@ public class TestIndexWriterCommit exten
     Term searchTerm = new Term("content", "aaa");
     IndexReader reader = DirectoryReader.open(dir);
     IndexSearcher searcher = newSearcher(reader);
-    ScoreDoc[] hits = searcher.search(new TermQuery(searchTerm), null, 1000).scoreDocs;
+    ScoreDoc[] hits = searcher.search(new TermQuery(searchTerm), 1000).scoreDocs;
     assertEquals("first number of hits", 14, hits.length);
     reader.close();
 
@@ -123,7 +123,7 @@ public class TestIndexWriterCommit exten
 
     reader = DirectoryReader.open(dir);
     searcher = newSearcher(reader);
-    hits = searcher.search(new TermQuery(searchTerm), null, 1000).scoreDocs;
+    hits = searcher.search(new TermQuery(searchTerm), 1000).scoreDocs;
     assertEquals("reader incorrectly sees changes from writer", 14, hits.length);
     reader.close();
 
@@ -134,7 +134,7 @@ public class TestIndexWriterCommit exten
 
     reader = DirectoryReader.open(dir);
     searcher = newSearcher(reader);
-    hits = searcher.search(new TermQuery(searchTerm), null, 1000).scoreDocs;
+    hits = searcher.search(new TermQuery(searchTerm), 1000).scoreDocs;
     assertEquals("saw changes after writer.abort", 14, hits.length);
     reader.close();
 
@@ -156,7 +156,7 @@ public class TestIndexWriterCommit exten
       }
       IndexReader r = DirectoryReader.open(dir);
       searcher = newSearcher(r);
-      hits = searcher.search(new TermQuery(searchTerm), null, 1000).scoreDocs;
+      hits = searcher.search(new TermQuery(searchTerm), 1000).scoreDocs;
       assertEquals("reader incorrectly sees changes from writer", 14, hits.length);
       r.close();
     }
@@ -164,7 +164,7 @@ public class TestIndexWriterCommit exten
     writer.close();
     IndexReader r = DirectoryReader.open(dir);
     searcher = newSearcher(r);
-    hits = searcher.search(new TermQuery(searchTerm), null, 1000).scoreDocs;
+    hits = searcher.search(new TermQuery(searchTerm), 1000).scoreDocs;
     assertEquals("didn't see changes after close", 218, hits.length);
     r.close();
 

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterDelete.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterDelete.java?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterDelete.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterDelete.java Tue Feb 24 18:50:15 2015
@@ -473,7 +473,7 @@ public class TestIndexWriterDelete exten
   private int getHitCount(Directory dir, Term term) throws IOException {
     IndexReader reader = DirectoryReader.open(dir);
     IndexSearcher searcher = newSearcher(reader);
-    int hitCount = searcher.search(new TermQuery(term), null, 1000).totalHits;
+    int hitCount = searcher.search(new TermQuery(term), 1000).totalHits;
     reader.close();
     return hitCount;
   }
@@ -656,7 +656,7 @@ public class TestIndexWriterDelete exten
         IndexSearcher searcher = newSearcher(newReader);
         ScoreDoc[] hits = null;
         try {
-          hits = searcher.search(new TermQuery(searchTerm), null, 1000).scoreDocs;
+          hits = searcher.search(new TermQuery(searchTerm), 1000).scoreDocs;
         }
         catch (IOException e) {
           e.printStackTrace();

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterMaxDocs.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterMaxDocs.java?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterMaxDocs.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterMaxDocs.java Tue Feb 24 18:50:15 2015
@@ -67,7 +67,7 @@ public class TestIndexWriterMaxDocs exte
       assertEquals(IndexWriter.MAX_DOCS, hits.totalHits);
 
       // Sort by docID reversed:
-      hits = searcher.search(new TermQuery(new Term("field", "text")), null, 10, new Sort(new SortField(null, SortField.Type.DOC, true)));
+      hits = searcher.search(new TermQuery(new Term("field", "text")), 10, new Sort(new SortField(null, SortField.Type.DOC, true)));
       assertEquals(IndexWriter.MAX_DOCS, hits.totalHits);
       assertEquals(10, hits.scoreDocs.length);
       assertEquals(IndexWriter.MAX_DOCS-1, hits.scoreDocs[0].doc);

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOnDiskFull.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOnDiskFull.java?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOnDiskFull.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOnDiskFull.java Tue Feb 24 18:50:15 2015
@@ -202,7 +202,7 @@ public class TestIndexWriterOnDiskFull e
     assertEquals("first docFreq", 57, reader.docFreq(searchTerm));
     
     IndexSearcher searcher = newSearcher(reader);
-    ScoreDoc[] hits = searcher.search(new TermQuery(searchTerm), null, 1000).scoreDocs;
+    ScoreDoc[] hits = searcher.search(new TermQuery(searchTerm), 1000).scoreDocs;
     assertEquals("first number of hits", 57, hits.length);
     reader.close();
     
@@ -396,7 +396,7 @@ public class TestIndexWriterOnDiskFull e
           
           searcher = newSearcher(reader);
           try {
-            hits = searcher.search(new TermQuery(searchTerm), null, END_COUNT).scoreDocs;
+            hits = searcher.search(new TermQuery(searchTerm), END_COUNT).scoreDocs;
           } catch (IOException e) {
             e.printStackTrace(System.out);
             fail(testName + ": exception when searching: " + e);

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestLazyProxSkipping.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestLazyProxSkipping.java?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestLazyProxSkipping.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestLazyProxSkipping.java Tue Feb 24 18:50:15 2015
@@ -114,7 +114,7 @@ public class TestLazyProxSkipping extend
         PhraseQuery pq = new PhraseQuery();
         pq.add(new Term(this.field, this.term1));
         pq.add(new Term(this.field, this.term2));
-        return this.searcher.search(pq, null, 1000).scoreDocs;        
+        return this.searcher.search(pq, 1000).scoreDocs;        
     }
     
     private void performTest(int numHits) throws IOException {

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestManyFields.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestManyFields.java?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestManyFields.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestManyFields.java Tue Feb 24 18:50:15 2015
@@ -107,7 +107,7 @@ public class TestManyFields extends Luce
 
     IndexReader reader = DirectoryReader.open(dir);
     IndexSearcher searcher = newSearcher(reader);
-    int totalHits = searcher.search(new TermQuery(new Term("field", "aaa")), null, 1).totalHits;
+    int totalHits = searcher.search(new TermQuery(new Term("field", "aaa")), 1).totalHits;
     assertEquals(n*100, totalHits);
     reader.close();
 

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestParallelCompositeReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestParallelCompositeReader.java?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestParallelCompositeReader.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestParallelCompositeReader.java Tue Feb 24 18:50:15 2015
@@ -402,8 +402,8 @@ public class TestParallelCompositeReader
   }
   
   private void queryTest(Query query) throws IOException {
-    ScoreDoc[] parallelHits = parallel.search(query, null, 1000).scoreDocs;
-    ScoreDoc[] singleHits = single.search(query, null, 1000).scoreDocs;
+    ScoreDoc[] parallelHits = parallel.search(query, 1000).scoreDocs;
+    ScoreDoc[] singleHits = single.search(query, 1000).scoreDocs;
     assertEquals(parallelHits.length, singleHits.length);
     for(int i = 0; i < parallelHits.length; i++) {
       assertEquals(parallelHits[i].score, singleHits[i].score, 0.001f);

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestParallelLeafReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestParallelLeafReader.java?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestParallelLeafReader.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestParallelLeafReader.java Tue Feb 24 18:50:15 2015
@@ -244,8 +244,8 @@ public class TestParallelLeafReader exte
   }
 
   private void queryTest(Query query) throws IOException {
-    ScoreDoc[] parallelHits = parallel.search(query, null, 1000).scoreDocs;
-    ScoreDoc[] singleHits = single.search(query, null, 1000).scoreDocs;
+    ScoreDoc[] parallelHits = parallel.search(query, 1000).scoreDocs;
+    ScoreDoc[] singleHits = single.search(query, 1000).scoreDocs;
     assertEquals(parallelHits.length, singleHits.length);
     for(int i = 0; i < parallelHits.length; i++) {
       assertEquals(parallelHits[i].score, singleHits[i].score, 0.001f);

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestBoolean2.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestBoolean2.java?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestBoolean2.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestBoolean2.java Tue Feb 24 18:50:15 2015
@@ -132,11 +132,11 @@ public class TestBoolean2 extends Lucene
     // sometimes return a default impl around the scorer so that we can
     // compare BS1 and BS2
     TopScoreDocCollector collector = TopScoreDocCollector.create(1000);
-    searcher.search(query, null, collector);
+    searcher.search(query, collector);
     ScoreDoc[] hits1 = collector.topDocs().scoreDocs;
 
     collector = TopScoreDocCollector.create(1000);
-    searcher.search(query, null, collector);
+    searcher.search(query, collector);
     ScoreDoc[] hits2 = collector.topDocs().scoreDocs; 
 
     assertEquals(mulFactor * collector.totalHits,
@@ -285,13 +285,13 @@ public class TestBoolean2 extends Lucene
         TopFieldCollector collector = TopFieldCollector.create(sort, 1000,
             false, true, true);
 
-        searcher.search(q1, null, collector);
+        searcher.search(q1, collector);
         ScoreDoc[] hits1 = collector.topDocs().scoreDocs;
 
         collector = TopFieldCollector.create(sort, 1000,
             false, true, true);
         
-        searcher.search(q1, null, collector);
+        searcher.search(q1, collector);
         ScoreDoc[] hits2 = collector.topDocs().scoreDocs;
         tot+=hits2.length;
         CheckHits.checkEqual(q1, hits1, hits2);

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestBooleanMinShouldMatch.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestBooleanMinShouldMatch.java?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestBooleanMinShouldMatch.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestBooleanMinShouldMatch.java Tue Feb 24 18:50:15 2015
@@ -86,7 +86,7 @@ public class TestBooleanMinShouldMatch e
 
     public void verifyNrHits(Query q, int expected) throws Exception {
         // bs1
-        ScoreDoc[] h = s.search(q, null, 1000).scoreDocs;
+        ScoreDoc[] h = s.search(q, 1000).scoreDocs;
         if (expected != h.length) {
             printHits(getTestName(), h, s);
         }
@@ -348,8 +348,8 @@ public class TestBooleanMinShouldMatch e
         // Can't use Hits because normalized scores will mess things
         // up.  The non-sorting version of search() that returns TopDocs
         // will not normalize scores.
-        TopDocs top1 = s.search(q1,null,100);
-        TopDocs top2 = s.search(q2,null,100);
+        TopDocs top1 = s.search(q1,100);
+        TopDocs top2 = s.search(q2,100);
         if (i < 100) {
           QueryUtils.check(random(), q1,s);
           QueryUtils.check(random(), q2,s);
@@ -409,8 +409,8 @@ public class TestBooleanMinShouldMatch e
         BooleanQuery q2 = new BooleanQuery();
         q2.add(new TermQuery(new Term("data", "1")), BooleanClause.Occur.SHOULD);
         q2.setMinimumNumberShouldMatch(1);
-        TopDocs top1 = s.search(q1,null,100);
-        TopDocs top2 = s.search(q2,null,100);
+        TopDocs top1 = s.search(q1,100);
+        TopDocs top2 = s.search(q2,100);
         assertSubsetOfSameScores(q2, top1, top2);
       } finally {
         s.setSimilarity(oldSimilarity);
@@ -431,8 +431,8 @@ public class TestBooleanMinShouldMatch e
         BooleanQuery q2 = new BooleanQuery();
         q2.add(new TermQuery(new Term("data", "1")), BooleanClause.Occur.SHOULD);
         q2.add(new TermQuery(new Term("data", "Z")), BooleanClause.Occur.MUST_NOT);
-        TopDocs top1 = s.search(q1,null,100);
-        TopDocs top2 = s.search(q2,null,100);
+        TopDocs top1 = s.search(q1,100);
+        TopDocs top2 = s.search(q2,100);
         assertSubsetOfSameScores(q2, top1, top2);
       } finally {
         s.setSimilarity(oldSimilarity);

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestBooleanOr.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestBooleanOr.java?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestBooleanOr.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestBooleanOr.java Tue Feb 24 18:50:15 2015
@@ -52,7 +52,7 @@ public class TestBooleanOr extends Lucen
 
   private int search(Query q) throws IOException {
     QueryUtils.check(random(), q,searcher);
-    return searcher.search(q, null, 1000).totalHits;
+    return searcher.search(q, 1000).totalHits;
   }
 
   public void testElements() throws IOException {

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestBooleanScorer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestBooleanScorer.java?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestBooleanScorer.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestBooleanScorer.java Tue Feb 24 18:50:15 2015
@@ -55,7 +55,7 @@ public class TestBooleanScorer extends L
     query.add(new TermQuery(new Term(FIELD, "9")), BooleanClause.Occur.MUST_NOT);
 
     IndexSearcher indexSearcher = newSearcher(ir);
-    ScoreDoc[] hits = indexSearcher.search(query, null, 1000).scoreDocs;
+    ScoreDoc[] hits = indexSearcher.search(query, 1000).scoreDocs;
     assertEquals("Number of matched documents", 2, hits.length);
     ir.close();
     directory.close();

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestCachingWrapperFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestCachingWrapperFilter.java?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestCachingWrapperFilter.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestCachingWrapperFilter.java Tue Feb 24 18:50:15 2015
@@ -71,16 +71,16 @@ public class TestCachingWrapperFilter ex
     IOUtils.close(ir, dir);
     super.tearDown();
   }
-  
+
   private void assertFilterEquals(Filter f1, Filter f2) throws Exception {
     Query query = new MatchAllDocsQuery();
-    TopDocs hits1 = is.search(query, f1, ir.maxDoc());
-    TopDocs hits2 = is.search(query, f2, ir.maxDoc());
+    TopDocs hits1 = is.search(new FilteredQuery(query, f1), ir.maxDoc());
+    TopDocs hits2 = is.search(new FilteredQuery(query, f2), ir.maxDoc());
     assertEquals(hits1.totalHits, hits2.totalHits);
     CheckHits.checkEqual(query, hits1.scoreDocs, hits2.scoreDocs);
     // now do it again to confirm caching works
-    TopDocs hits3 = is.search(query, f1, ir.maxDoc());
-    TopDocs hits4 = is.search(query, f2, ir.maxDoc());
+    TopDocs hits3 = is.search(new FilteredQuery(query, f1), ir.maxDoc());
+    TopDocs hits4 = is.search(new FilteredQuery(query, f2), ir.maxDoc());
     assertEquals(hits3.totalHits, hits4.totalHits);
     CheckHits.checkEqual(query, hits3.scoreDocs, hits4.scoreDocs);
   }
@@ -319,7 +319,7 @@ public class TestCachingWrapperFilter ex
 
     CachingWrapperFilter filter = new CachingWrapperFilter(startFilter, FilterCachingPolicy.ALWAYS_CACHE);
 
-    docs = searcher.search(new MatchAllDocsQuery(), filter, 1);
+    docs = searcher.search(new FilteredQuery(new MatchAllDocsQuery(), filter), 1);
     assertTrue(filter.ramBytesUsed() > 0);
 
     assertEquals("[query + filter] Should find a hit...", 1, docs.totalHits);
@@ -356,7 +356,7 @@ public class TestCachingWrapperFilter ex
     searcher = newSearcher(reader, false);
 
     missCount = filter.missCount;
-    docs = searcher.search(new MatchAllDocsQuery(), filter, 1);
+    docs = searcher.search(new FilteredQuery(new MatchAllDocsQuery(), filter), 1);
     assertEquals("[query + filter] Should *not* find a hit...", 0, docs.totalHits);
 
     // cache hit
@@ -370,7 +370,7 @@ public class TestCachingWrapperFilter ex
     reader = refreshReader(reader);
     searcher = newSearcher(reader, false);
 
-    docs = searcher.search(new MatchAllDocsQuery(), filter, 1);
+    docs = searcher.search(new FilteredQuery(new MatchAllDocsQuery(), filter), 1);
     assertEquals("[query + filter] Should find a hit...", 1, docs.totalHits);
     missCount = filter.missCount;
     assertTrue(missCount > 0);
@@ -389,7 +389,7 @@ public class TestCachingWrapperFilter ex
     reader = refreshReader(reader);
     searcher = newSearcher(reader, false);
         
-    docs = searcher.search(new MatchAllDocsQuery(), filter, 1);
+    docs = searcher.search(new FilteredQuery(new MatchAllDocsQuery(), filter), 1);
     assertEquals("[query + filter] Should find 2 hits...", 2, docs.totalHits);
     assertTrue(filter.missCount > missCount);
     missCount = filter.missCount;
@@ -405,7 +405,7 @@ public class TestCachingWrapperFilter ex
     reader = refreshReader(reader);
     searcher = newSearcher(reader, false);
 
-    docs = searcher.search(new MatchAllDocsQuery(), filter, 1);
+    docs = searcher.search(new FilteredQuery(new MatchAllDocsQuery(), filter), 1);
     assertEquals("[query + filter] Should *not* find a hit...", 0, docs.totalHits);
     // CWF reused the same entry (it dynamically applied the deletes):
     assertEquals(missCount, filter.missCount);

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestConstantScoreQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestConstantScoreQuery.java?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestConstantScoreQuery.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestConstantScoreQuery.java Tue Feb 24 18:50:15 2015
@@ -144,12 +144,12 @@ public class TestConstantScoreQuery exte
     Query query = new ConstantScoreQuery(filterB);
 
     IndexSearcher s = newSearcher(r);
-    assertEquals(1, s.search(query, filterB, 1).totalHits); // Query for field:b, Filter field:b
+    assertEquals(1, s.search(new FilteredQuery(query, filterB), 1).totalHits); // Query for field:b, Filter field:b
 
     Filter filterA = new CachingWrapperFilter(new QueryWrapperFilter(new TermQuery(new Term("field", "a"))));
     query = new ConstantScoreQuery(filterA);
 
-    assertEquals(0, s.search(query, filterB, 1).totalHits); // Query field:b, Filter field:a
+    assertEquals(0, s.search(new FilteredQuery(query, filterB), 1).totalHits); // Query field:b, Filter field:a
 
     r.close();
     d.close();

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestCustomSearcherSort.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestCustomSearcherSort.java?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestCustomSearcherSort.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestCustomSearcherSort.java Tue Feb 24 18:50:15 2015
@@ -112,7 +112,7 @@ public class TestCustomSearcherSort exte
   // make sure the documents returned by the search match the expected list
   private void matchHits(IndexSearcher searcher, Sort sort) throws IOException {
     // make a query without sorting first
-    ScoreDoc[] hitsByRank = searcher.search(query, null, Integer.MAX_VALUE).scoreDocs;
+    ScoreDoc[] hitsByRank = searcher.search(query, Integer.MAX_VALUE).scoreDocs;
     checkHits(hitsByRank, "Sort by rank: "); // check for duplicates
     Map<Integer,Integer> resultMap = new TreeMap<>();
     // store hits in TreeMap - TreeMap does not allow duplicates; existing
@@ -124,7 +124,7 @@ public class TestCustomSearcherSort exte
     }
     
     // now make a query using the sort criteria
-    ScoreDoc[] resultSort = searcher.search(query, null, Integer.MAX_VALUE,
+    ScoreDoc[] resultSort = searcher.search(query, Integer.MAX_VALUE,
         sort).scoreDocs;
     checkHits(resultSort, "Sort by custom criteria: "); // check for duplicates
     
@@ -192,23 +192,23 @@ public class TestCustomSearcherSort exte
     }
     
     @Override
-    public TopFieldDocs search(Query query, Filter filter, int nDocs, Sort sort)
+    public TopFieldDocs search(Query query, int nDocs, Sort sort)
         throws IOException {
       BooleanQuery bq = new BooleanQuery();
       bq.add(query, BooleanClause.Occur.MUST);
       bq.add(new TermQuery(new Term("mandant", Integer.toString(switcher))),
           BooleanClause.Occur.MUST);
-      return super.search(bq, filter, nDocs, sort);
+      return super.search(bq, nDocs, sort);
     }
     
     @Override
-    public TopDocs search(Query query, Filter filter, int nDocs)
+    public TopDocs search(Query query, int nDocs)
         throws IOException {
       BooleanQuery bq = new BooleanQuery();
       bq.add(query, BooleanClause.Occur.MUST);
       bq.add(new TermQuery(new Term("mandant", Integer.toString(switcher))),
           BooleanClause.Occur.MUST);
-      return super.search(bq, filter, nDocs);
+      return super.search(bq, nDocs);
     }
   }
   

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestDateFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestDateFilter.java?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestDateFilter.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestDateFilter.java Tue Feb 24 18:50:15 2015
@@ -76,23 +76,23 @@ public class TestDateFilter extends Luce
     ScoreDoc[] result;
     
     // ensure that queries return expected results without DateFilter first
-    result = searcher.search(query1, null, 1000).scoreDocs;
+    result = searcher.search(query1, 1000).scoreDocs;
     assertEquals(0, result.length);
     
-    result = searcher.search(query2, null, 1000).scoreDocs;
+    result = searcher.search(query2, 1000).scoreDocs;
     assertEquals(1, result.length);
     
     // run queries with DateFilter
-    result = searcher.search(query1, df1, 1000).scoreDocs;
+    result = searcher.search(new FilteredQuery(query1, df1), 1000).scoreDocs;
     assertEquals(0, result.length);
     
-    result = searcher.search(query1, df2, 1000).scoreDocs;
+    result = searcher.search(new FilteredQuery(query1, df2), 1000).scoreDocs;
     assertEquals(0, result.length);
     
-    result = searcher.search(query2, df1, 1000).scoreDocs;
+    result = searcher.search(new FilteredQuery(query2, df1), 1000).scoreDocs;
     assertEquals(1, result.length);
     
-    result = searcher.search(query2, df2, 1000).scoreDocs;
+    result = searcher.search(new FilteredQuery(query2, df2), 1000).scoreDocs;
     assertEquals(0, result.length);
     reader.close();
     indexStore.close();
@@ -140,23 +140,23 @@ public class TestDateFilter extends Luce
     ScoreDoc[] result;
     
     // ensure that queries return expected results without DateFilter first
-    result = searcher.search(query1, null, 1000).scoreDocs;
+    result = searcher.search(query1, 1000).scoreDocs;
     assertEquals(0, result.length);
     
-    result = searcher.search(query2, null, 1000).scoreDocs;
+    result = searcher.search(query2, 1000).scoreDocs;
     assertEquals(1, result.length);
     
     // run queries with DateFilter
-    result = searcher.search(query1, df1, 1000).scoreDocs;
+    result = searcher.search(new FilteredQuery(query1, df1), 1000).scoreDocs;
     assertEquals(0, result.length);
     
-    result = searcher.search(query1, df2, 1000).scoreDocs;
+    result = searcher.search(new FilteredQuery(query1, df2), 1000).scoreDocs;
     assertEquals(0, result.length);
     
-    result = searcher.search(query2, df1, 1000).scoreDocs;
+    result = searcher.search(new FilteredQuery(query2, df1), 1000).scoreDocs;
     assertEquals(1, result.length);
     
-    result = searcher.search(query2, df2, 1000).scoreDocs;
+    result = searcher.search(new FilteredQuery(query2, df2), 1000).scoreDocs;
     assertEquals(0, result.length);
     reader.close();
     indexStore.close();

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestDateSort.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestDateSort.java?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestDateSort.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestDateSort.java Tue Feb 24 18:50:15 2015
@@ -82,7 +82,7 @@ public class TestDateSort extends Lucene
 
     // Execute the search and process the search results.
     String[] actualOrder = new String[5];
-    ScoreDoc[] hits = searcher.search(query, null, 1000, sort).scoreDocs;
+    ScoreDoc[] hits = searcher.search(query, 1000, sort).scoreDocs;
     for (int i = 0; i < hits.length; i++) {
       Document document = searcher.doc(hits[i].doc);
       String text = document.get(TEXT_FIELD);

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestDisjunctionMaxQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestDisjunctionMaxQuery.java?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestDisjunctionMaxQuery.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestDisjunctionMaxQuery.java Tue Feb 24 18:50:15 2015
@@ -208,7 +208,7 @@ public class TestDisjunctionMaxQuery ext
     q.add(tq("hed", "elephant"));
     QueryUtils.check(random(), q, s);
     
-    ScoreDoc[] h = s.search(q, null, 1000).scoreDocs;
+    ScoreDoc[] h = s.search(q, 1000).scoreDocs;
     
     try {
       assertEquals("all docs should match " + q.toString(), 4, h.length);
@@ -232,7 +232,7 @@ public class TestDisjunctionMaxQuery ext
     q.add(tq("dek", "elephant"));
     QueryUtils.check(random(), q, s);
     
-    ScoreDoc[] h = s.search(q, null, 1000).scoreDocs;
+    ScoreDoc[] h = s.search(q, 1000).scoreDocs;
     
     try {
       assertEquals("3 docs should match " + q.toString(), 3, h.length);
@@ -257,7 +257,7 @@ public class TestDisjunctionMaxQuery ext
     q.add(tq("dek", "elephant"));
     QueryUtils.check(random(), q, s);
     
-    ScoreDoc[] h = s.search(q, null, 1000).scoreDocs;
+    ScoreDoc[] h = s.search(q, 1000).scoreDocs;
     
     try {
       assertEquals("all docs should match " + q.toString(), 4, h.length);
@@ -280,7 +280,7 @@ public class TestDisjunctionMaxQuery ext
     q.add(tq("dek", "elephant"));
     QueryUtils.check(random(), q, s);
     
-    ScoreDoc[] h = s.search(q, null, 1000).scoreDocs;
+    ScoreDoc[] h = s.search(q, 1000).scoreDocs;
     
     try {
       assertEquals("3 docs should match " + q.toString(), 3, h.length);
@@ -319,7 +319,7 @@ public class TestDisjunctionMaxQuery ext
     
     QueryUtils.check(random(), q, s);
     
-    ScoreDoc[] h = s.search(q, null, 1000).scoreDocs;
+    ScoreDoc[] h = s.search(q, 1000).scoreDocs;
     
     try {
       assertEquals("3 docs should match " + q.toString(), 3, h.length);
@@ -351,7 +351,7 @@ public class TestDisjunctionMaxQuery ext
     }
     QueryUtils.check(random(), q, s);
     
-    ScoreDoc[] h = s.search(q, null, 1000).scoreDocs;
+    ScoreDoc[] h = s.search(q, 1000).scoreDocs;
     
     try {
       assertEquals("4 docs should match " + q.toString(), 4, h.length);
@@ -387,7 +387,7 @@ public class TestDisjunctionMaxQuery ext
     }
     QueryUtils.check(random(), q, s);
     
-    ScoreDoc[] h = s.search(q, null, 1000).scoreDocs;
+    ScoreDoc[] h = s.search(q, 1000).scoreDocs;
     
     try {
       
@@ -441,7 +441,7 @@ public class TestDisjunctionMaxQuery ext
     }
     QueryUtils.check(random(), q, s);
     
-    ScoreDoc[] h = s.search(q, null, 1000).scoreDocs;
+    ScoreDoc[] h = s.search(q, 1000).scoreDocs;
     
     try {
       

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestDocIdSet.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestDocIdSet.java?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestDocIdSet.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestDocIdSet.java Tue Feb 24 18:50:15 2015
@@ -133,7 +133,7 @@ public class TestDocIdSet extends Lucene
       }
     };
     
-    Assert.assertEquals(0, searcher.search(new MatchAllDocsQuery(), f, 10).totalHits);
+    Assert.assertEquals(0, searcher.search(new FilteredQuery(new MatchAllDocsQuery(), f), 10).totalHits);
     reader.close();
     dir.close();
   }
@@ -179,7 +179,7 @@ public class TestDocIdSet extends Lucene
       }
     };
     
-    Assert.assertEquals(0, searcher.search(new MatchAllDocsQuery(), f, 10).totalHits);
+    Assert.assertEquals(0, searcher.search(new FilteredQuery(new MatchAllDocsQuery(), f), 10).totalHits);
     reader.close();
     dir.close();
   }

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestElevationComparator.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestElevationComparator.java?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestElevationComparator.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestElevationComparator.java Tue Feb 24 18:50:15 2015
@@ -80,7 +80,7 @@ public class TestElevationComparator ext
       );
 
     TopDocsCollector<Entry> topCollector = TopFieldCollector.create(sort, 50, false, true, true);
-    searcher.search(newq, null, topCollector);
+    searcher.search(newq, topCollector);
 
     TopDocs topDocs = topCollector.topDocs(0, 10);
     int nDocsReturned = topDocs.scoreDocs.length;

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestFieldCacheTermsFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestFieldCacheTermsFilter.java?rev=1662082&r1=1662081&r2=1662082&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestFieldCacheTermsFilter.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestFieldCacheTermsFilter.java Tue Feb 24 18:50:15 2015
@@ -21,7 +21,6 @@ import org.apache.lucene.document.Field;
 import org.apache.lucene.document.SortedDocValuesField;
 import org.apache.lucene.util.BytesRef;
 import org.apache.lucene.util.LuceneTestCase;
-
 import org.apache.lucene.document.Document;
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.RandomIndexWriter;
@@ -57,18 +56,18 @@ public class TestFieldCacheTermsFilter e
 
     List<String> terms = new ArrayList<>();
     terms.add("5");
-    results = searcher.search(q, new DocValuesTermsFilter(fieldName,  terms.toArray(new String[0])), numDocs).scoreDocs;
+    results = searcher.search(new FilteredQuery(q, new DocValuesTermsFilter(fieldName,  terms.toArray(new String[0]))), numDocs).scoreDocs;
     assertEquals("Must match nothing", 0, results.length);
 
     terms = new ArrayList<>();
     terms.add("10");
-    results = searcher.search(q, new DocValuesTermsFilter(fieldName,  terms.toArray(new String[0])), numDocs).scoreDocs;
+    results = searcher.search(new FilteredQuery(q, new DocValuesTermsFilter(fieldName,  terms.toArray(new String[0]))), numDocs).scoreDocs;
     assertEquals("Must match 1", 1, results.length);
 
     terms = new ArrayList<>();
     terms.add("10");
     terms.add("20");
-    results = searcher.search(q, new DocValuesTermsFilter(fieldName,  terms.toArray(new String[0])), numDocs).scoreDocs;
+    results = searcher.search(new FilteredQuery(q, new DocValuesTermsFilter(fieldName,  terms.toArray(new String[0]))), numDocs).scoreDocs;
     assertEquals("Must match 2", 2, results.length);
 
     reader.close();



Mime
View raw message