public class AssertingIndexSearcher extends IndexSearcher
IndexSearcher
and Weight
.IndexSearcher.LeafSlice
leafContexts, readerContext
Constructor and Description |
---|
AssertingIndexSearcher(java.util.Random random,
IndexReader r) |
AssertingIndexSearcher(java.util.Random random,
IndexReaderContext context) |
AssertingIndexSearcher(java.util.Random random,
IndexReaderContext context,
java.util.concurrent.ExecutorService ex) |
AssertingIndexSearcher(java.util.Random random,
IndexReader r,
java.util.concurrent.ExecutorService ex) |
Modifier and Type | Method and Description |
---|---|
Weight |
createWeight(Query query,
boolean needsScores,
float boost)
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(java.util.List<LeafReaderContext> leaves,
Weight weight,
Collector collector)
Lower-level search API.
|
java.lang.String |
toString() |
collectionStatistics, count, createNormalizedWeight, doc, doc, doc, explain, explain, getDefaultQueryCache, getDefaultQueryCachingPolicy, getDefaultSimilarity, getIndexReader, getQueryCache, getQueryCachingPolicy, getSimilarity, getSlices, getTopReaderContext, search, search, search, search, search, searchAfter, searchAfter, searchAfter, setDefaultQueryCache, setDefaultQueryCachingPolicy, setQueryCache, setQueryCachingPolicy, setSimilarity, slices, termStatistics
public AssertingIndexSearcher(java.util.Random random, IndexReader r)
public AssertingIndexSearcher(java.util.Random random, IndexReaderContext context)
public AssertingIndexSearcher(java.util.Random random, IndexReader r, java.util.concurrent.ExecutorService ex)
public AssertingIndexSearcher(java.util.Random random, IndexReaderContext context, java.util.concurrent.ExecutorService ex)
public Weight createWeight(Query query, boolean needsScores, float boost) throws java.io.IOException
IndexSearcher
Weight
for the given query, potentially adding caching
if possible and configured.createWeight
in class IndexSearcher
java.io.IOException
public Query rewrite(Query original) throws java.io.IOException
IndexSearcher
rewrite
in class IndexSearcher
java.io.IOException
protected void search(java.util.List<LeafReaderContext> leaves, Weight weight, Collector collector) throws java.io.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 hitsjava.io.IOException
public java.lang.String toString()
toString
in class IndexSearcher
Copyright © 2000–2019 The Apache Software Foundation. All rights reserved.