Package org.apache.lucene.tests.search
Class AssertingIndexSearcher
- java.lang.Object
-
- org.apache.lucene.search.IndexSearcher
-
- org.apache.lucene.tests.search.AssertingIndexSearcher
-
public class AssertingIndexSearcher extends IndexSearcher
Helper class that adds some extra checks to ensure correct usage ofIndexSearcher
andWeight
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.search.IndexSearcher
IndexSearcher.LeafSlice, IndexSearcher.TooManyClauses, IndexSearcher.TooManyNestedClauses
-
-
Field Summary
-
Fields inherited from class org.apache.lucene.search.IndexSearcher
leafContexts, readerContext
-
-
Constructor Summary
Constructors Constructor Description AssertingIndexSearcher(Random random, IndexReader r)
AssertingIndexSearcher(Random random, IndexReaderContext context)
AssertingIndexSearcher(Random random, IndexReaderContext context, ExecutorService ex)
AssertingIndexSearcher(Random random, IndexReader r, ExecutorService ex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Weight
createWeight(Query query, ScoreMode scoreMode, float boost)
Query
rewrite(Query original)
protected void
search(List<LeafReaderContext> leaves, Weight weight, Collector collector)
String
toString()
-
Methods inherited from class org.apache.lucene.search.IndexSearcher
collectionStatistics, count, doc, doc, doc, explain, explain, getDefaultQueryCache, getDefaultQueryCachingPolicy, getDefaultSimilarity, getExecutor, getIndexReader, getLeafContexts, getMaxClauseCount, getQueryCache, getQueryCachingPolicy, getSimilarity, getSlices, getTaskExecutor, getTimeout, getTopReaderContext, search, search, search, search, search, searchAfter, searchAfter, searchAfter, setDefaultQueryCache, setDefaultQueryCachingPolicy, setMaxClauseCount, setQueryCache, setQueryCachingPolicy, setSimilarity, setTimeout, slices, slices, storedFields, termStatistics, timedOut
-
-
-
-
Constructor Detail
-
AssertingIndexSearcher
public AssertingIndexSearcher(Random random, IndexReader r)
-
AssertingIndexSearcher
public AssertingIndexSearcher(Random random, IndexReaderContext context)
-
AssertingIndexSearcher
public AssertingIndexSearcher(Random random, IndexReader r, ExecutorService ex)
-
AssertingIndexSearcher
public AssertingIndexSearcher(Random random, IndexReaderContext context, ExecutorService ex)
-
-
Method Detail
-
createWeight
public Weight createWeight(Query query, ScoreMode scoreMode, float boost) throws IOException
- Overrides:
createWeight
in classIndexSearcher
- Throws:
IOException
-
rewrite
public Query rewrite(Query original) throws IOException
- Overrides:
rewrite
in classIndexSearcher
- Throws:
IOException
-
search
protected void search(List<LeafReaderContext> leaves, Weight weight, Collector collector) throws IOException
- Overrides:
search
in classIndexSearcher
- Throws:
IOException
-
toString
public String toString()
- Overrides:
toString
in classIndexSearcher
-
-