Package org.apache.lucene.tests.search
Class CheckHits.ExplanationAssertingSearcher
- java.lang.Object
-
- org.apache.lucene.search.IndexSearcher
-
- org.apache.lucene.tests.search.CheckHits.ExplanationAssertingSearcher
-
- Enclosing class:
- CheckHits
public static class CheckHits.ExplanationAssertingSearcher extends IndexSearcher
an IndexSearcher that implicitly checks hte explanation of every match whenever it executes a search.- See Also:
CheckHits.ExplanationAsserter
-
-
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 ExplanationAssertingSearcher(IndexReader r)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkExplanations(Query q)
TopDocs
search(Query query, int n)
TopFieldDocs
search(Query query, int n, Sort sort)
void
search(Query query, Collector results)
<C extends Collector,T>
Tsearch(Query query, CollectorManager<C,T> collectorManager)
-
Methods inherited from class org.apache.lucene.search.IndexSearcher
collectionStatistics, count, createWeight, doc, doc, doc, explain, explain, getDefaultQueryCache, getDefaultQueryCachingPolicy, getDefaultSimilarity, getExecutor, getIndexReader, getLeafContexts, getMaxClauseCount, getQueryCache, getQueryCachingPolicy, getSimilarity, getSlices, getTaskExecutor, getTimeout, getTopReaderContext, rewrite, search, search, searchAfter, searchAfter, searchAfter, setDefaultQueryCache, setDefaultQueryCachingPolicy, setMaxClauseCount, setQueryCache, setQueryCachingPolicy, setSimilarity, setTimeout, slices, slices, storedFields, termStatistics, timedOut, toString
-
-
-
-
Constructor Detail
-
ExplanationAssertingSearcher
public ExplanationAssertingSearcher(IndexReader r)
-
-
Method Detail
-
checkExplanations
protected void checkExplanations(Query q) throws IOException
- Throws:
IOException
-
search
public TopFieldDocs search(Query query, int n, Sort sort) throws IOException
- Overrides:
search
in classIndexSearcher
- Throws:
IOException
-
search
public void search(Query query, Collector results) throws IOException
- Overrides:
search
in classIndexSearcher
- Throws:
IOException
-
search
public <C extends Collector,T> T search(Query query, CollectorManager<C,T> collectorManager) throws IOException
- Overrides:
search
in classIndexSearcher
- Throws:
IOException
-
search
public TopDocs search(Query query, int n) throws IOException
- Overrides:
search
in classIndexSearcher
- Throws:
IOException
-
-