Class TermContext
Maintains a IndexReader TermState view over IndexReader instances containing a single term. The TermContext doesn't track if the given TermState objects are valid, neither if the TermState instances refer to the same terms in the associated readers.
@lucene.experimental
Inheritance
Assembly: DistributedLucene.Net.dll
Syntax
public sealed class TermContext : object
Constructors
Name | Description |
---|---|
TermContext(IndexReaderContext) | Creates an empty TermContext from a IndexReaderContext |
TermContext(IndexReaderContext, TermState, Int32, Int32, Int64) | Creates a TermContext with an initial TermState, IndexReader pair. |
Properties
Name | Description |
---|---|
DocFreq | expert: only available for queries that want to lie about docfreq @lucene.internal |
TopReaderContext | Holds the IndexReaderContext of the top-level IndexReader, used internally only for asserting. @lucene.internal |
TotalTermFreq | Returns the accumulated term frequency of all TermState instances passed to Register(TermState, Int32, Int32, Int64). |
Methods
Name | Description |
---|---|
Build(IndexReaderContext, Term) | Creates a TermContext from a top-level IndexReaderContext and the given Term. this method will lookup the given term in all context's leaf readers and register each of the readers containing the term in the returned TermContext using the leaf reader's ordinal. Note: the given context must be a top-level context. |
Clear() | Clears the TermContext internal state and removes all registered TermStates |
Get(Int32) | Returns the TermState for an leaf ordinal or |
Register(TermState, Int32, Int32, Int64) | Registers and associates a TermState with an leaf ordinal. The leaf ordinal should be derived from a IndexReaderContext's leaf ord. |