Class IndexSearcher
Implements search over a single IndexReader.
Applications usually need only call the inherited
Search(Query, Int32)
or Search(Query, Filter, Int32) methods. For
performance reasons, if your index is unchanging, you
should share a single
NOTE:
Inheritance
Assembly: DistributedLucene.Net.dll
Syntax
public class IndexSearcher : IIdentifiableSurrogate
Constructors
Name | Description |
---|---|
IndexSearcher(IndexReader) | Creates a searcher searching the provided index. |
IndexSearcher(IndexReader, TaskScheduler) | Runs searches for each segment separately, using the
provided @lucene.experimental |
IndexSearcher(IndexReaderContext) | Creates a searcher searching the provided top-level IndexReaderContext. @lucene.experimental |
IndexSearcher(IndexReaderContext, TaskScheduler) | Creates a searcher searching the provided top-level IndexReaderContext.
Given a non- @lucene.experimental |
Fields
Name | Description |
---|---|
m_leafContexts | |
m_leafSlices | Used with executor - each slice holds a set of leafs executed within one thread |
m_readerContext |
Properties
Name | Description |
---|---|
AllowPartialResults | Set to false to return an overall failure if the request would produce partial results. Set to true, which will allow partial results in the case of partial cluster. |
DefaultSimilarity | Expert: returns a default Similarity instance.
In general, this method is only called to initialize searchers and writers.
User code and query implementations should respect
@lucene.internal |
IndexReader | Return the IndexReader this searches. |
Reader | |
Similarity | Expert: Set the Similarity implementation used by this IndexSearcher. |
TopReaderContext | Returns this searchers the top-level IndexReaderContext. |
Methods
Name | Description |
---|---|
CollectionStatistics(String) | Returns CollectionStatistics for a field. This can be overridden for example, to return a field's statistics across a distributed collection. @lucene.experimental |
CreateNormalizedWeight(Query) | Creates a normalized weight for a top-level Query.
The query is rewritten by this method and @lucene.internal |
Dispose() | |
Dispose(Boolean) | |
Doc(Int64) | Sugar for
|
Doc(Int64, ISet<String>) | Sugar for
|
Doc(Int64, StoredFieldVisitor) | Sugar for
|
Document(Int32, ISet<String>) | |
Explain(Query, Int32) | Returns an Explanation that describes how This is intended to be used in developing Similarity implementations, and, for good performance, should not be displayed with every hit. Computing an explanation is as expensive as executing the query over the entire index. |
Explain(Weight, Int32) | Expert: low-level implementation method
Returns an Explanation that describes how This is intended to be used in developing Similarity implementations, and, for good performance, should not be displayed with every hit. Computing an explanation is as expensive as executing the query over the entire index. Applications should call |
Finalize() | |
GetSurrogateId() | |
Rewrite(Query) | Expert: called to re-write queries into primitive queries. |
Search(IList<AtomicReaderContext>, Weight, FieldDoc, Int32, Sort, Boolean, Boolean, Boolean) | Just like Search(Weight, Int32, Sort, Boolean, Boolean), but you choose
whether or not the fields in the returned FieldDoc instances should
be set by specifying |
Search(IList<AtomicReaderContext>, Weight, ICollector) | Lower-level search API. Collect(Int32) is called for every document. NOTE: this method executes the searches on all given leaves exclusively. To search across all the searchers leaves use m_leafContexts. |
Search(IList<AtomicReaderContext>, Weight, ScoreDoc, Int32) | Expert: Low-level search implementation. Finds the top
hits for query .
Applications should usually call |
Search(Query, Filter, ICollector) | Lower-level search API. Collect(Int32) is called for every matching document. |
Search(Query, Filter, Int32) | Finds the top |
Search(Query, Filter, Int32, Sort) | Search implementation with arbitrary sorting. Finds
the top NOTE: this does not compute scores by default; use
|
Search(Query, Filter, Int32, Sort, Boolean, Boolean) | Search implementation with arbitrary sorting, plus
control over whether hit scores and max score
should be computed. Finds
the top |
Search(Query, ICollector) | Lower-level search API. Collect(Int32) is called for every matching document. |
Search(Query, Int32) | Finds the top |
Search(Query, Int32, Sort) | Search implementation with arbitrary sorting and no filter. |
Search(Weight, FieldDoc, Int32, Sort, Boolean, Boolean, Boolean) | Just like Search(Weight, Int32, Sort, Boolean, Boolean), but you choose
whether or not the fields in the returned FieldDoc instances should
be set by specifying |
Search(Weight, ScoreDoc, Int32) | Expert: Low-level search implementation. Finds the top Applications should usually call |
Search(Weight, Int32, Sort, Boolean, Boolean) | Expert: Low-level search implementation with arbitrary
sorting and control over whether hit scores and max
score should be computed. Finds
the top Applications should usually call
|
SearchAfter(ScoreDoc, Query, Filter, Int32) | Finds the top
By passing the bottom result from a previous page as |
SearchAfter(ScoreDoc, Query, Filter, Int32, Sort) | Finds the top
By passing the bottom result from a previous page as |
SearchAfter(ScoreDoc, Query, Filter, Int32, Sort, Boolean, Boolean) | Finds the top
By passing the bottom result from a previous page as |
SearchAfter(ScoreDoc, Query, Int32) | Finds the top
By passing the bottom result from a previous page as |
SearchAfter(ScoreDoc, Query, Int32, Sort) | Finds the top
By passing the bottom result from a previous page as |
Slices(IList<AtomicReaderContext>) | Expert: Creates an array of leaf slices each holding a subset of the given leaves. Each IndexSearcher.LeafSlice is executed in a single thread. By default there will be one IndexSearcher.LeafSlice per leaf (AtomicReaderContext). |
TermStatistics(Term, TermContext) | Returns TermStatistics for a term. This can be overridden for example, to return a term's statistics across a distributed collection. @lucene.experimental |
ToString() | |
WrapFilter(Query, Filter) | @lucene.internal |