public class AssertingIndexSearcher extends IndexSearcher
IndexSearcher
and Weight
.IndexSearcher.LeafSlice
leafContexts, leafSlices, readerContext
Constructor and 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) |
Modifier and Type | Method and Description |
---|---|
Weight |
createNormalizedWeight(Query query,
boolean needsScores)
Ensures, that the returned
Weight is not normalized again, which may produce wrong scores. |
Weight |
createWeight(Query query,
boolean needsScores)
Creates a
Weight for the given query, potentially adding caching
if possible and configured. |
Query |
rewrite(Query original)
Expert: called to re-write queries into primitive queries.
|
protected void |
search(List<LeafReaderContext> leaves,
Weight weight,
Collector collector)
Lower-level search API.
|
String |
toString() |
collectionStatistics, count, doc, doc, doc, explain, explain, getDefaultQueryCache, getDefaultQueryCachingPolicy, getDefaultSimilarity, getIndexReader, getSimilarity, getTopReaderContext, search, search, search, search, search, search, search, search, search, searchAfter, searchAfter, searchAfter, searchAfter, searchAfter, searchAfter, setDefaultQueryCache, setDefaultQueryCachingPolicy, setQueryCache, setQueryCachingPolicy, setSimilarity, slices, termStatistics, wrapFilter
public AssertingIndexSearcher(Random random, IndexReader r)
public AssertingIndexSearcher(Random random, IndexReaderContext context)
public AssertingIndexSearcher(Random random, IndexReader r, ExecutorService ex)
public AssertingIndexSearcher(Random random, IndexReaderContext context, ExecutorService ex)
public Weight createNormalizedWeight(Query query, boolean needsScores) throws IOException
Weight
is not normalized again, which may produce wrong scores.createNormalizedWeight
in class IndexSearcher
IOException
public Weight createWeight(Query query, boolean needsScores) throws IOException
IndexSearcher
Weight
for the given query, potentially adding caching
if possible and configured.createWeight
in class IndexSearcher
IOException
public Query rewrite(Query original) throws IOException
IndexSearcher
rewrite
in class IndexSearcher
IOException
protected void search(List<LeafReaderContext> leaves, Weight weight, Collector collector) throws IOException
IndexSearcher
LeafCollector.collect(int)
is called for every document.
NOTE: this method executes the searches on all given leaves exclusively.
To search across all the searchers leaves use IndexSearcher.leafContexts
.
search
in class IndexSearcher
leaves
- the searchers leaves to execute the searches onweight
- to match documentscollector
- to receive hitsIOException
public String toString()
toString
in class IndexSearcher
Copyright © 2000–2015 The Apache Software Foundation. All rights reserved.