Class MultiFields
Exposes flex API, merged from flex API of sub-segments. This is useful when you're interacting with an IndexReader implementation that consists of sequential sub-readers (eg DirectoryReader or MultiReader).
NOTE: for composite readers, you'll get better performance by gathering the sub readers using Context to get the atomic leaves and then operate per-AtomicReader, instead of using this class.
@lucene.experimental
Assembly: DistributedLucene.Net.dll
Syntax
public sealed class MultiFields : Fields
Constructors
Name | Description |
---|---|
MultiFields(Fields[], ReaderSlice[]) | Expert: construct a new MultiFields instance directly. @lucene.internal |
Properties
Name | Description |
---|---|
Count |
Methods
Name | Description |
---|---|
GetEnumerator() | |
GetFields(IndexReader) | Returns a single Fields instance for this
reader, merging fields/terms/docs/positions on the
fly. This method will return NOTE: this is a slow way to access postings. It's better to get the sub-readers and iterate through them yourself. |
GetIndexedFields(IndexReader) | Call this to get the (merged) FieldInfos representing the set of indexed fields only for a composite reader. NOTE: the returned field numbers will likely not correspond to the actual field numbers in the underlying readers, and codec metadata (GetAttribute(String)) will be unavailable. |
GetLiveDocs(IndexReader) | Returns a single IBits instance for this
reader, merging live Documents on the
fly. This method will return NOTE: this is a very slow way to access live docs. For example, each IBits access will require a binary search. It's better to get the sub-readers and iterate through them yourself. |
GetMergedFieldInfos(IndexReader) | Call this to get the (merged) FieldInfos for a composite reader. NOTE: the returned field numbers will likely not correspond to the actual field numbers in the underlying readers, and codec metadata (GetAttribute(String)) will be unavailable. |
GetTermDocsEnum(IndexReader, IBits, String, BytesRef) | Returns DocsEnum for the specified field &
term. This will return |
GetTermDocsEnum(IndexReader, IBits, String, BytesRef, DocsFlags) | Returns DocsEnum for the specified field &
term, with control over whether freqs are required.
Some codecs may be able to optimize their
implementation when freqs are not required. This will
return |
GetTermPositionsEnum(IndexReader, IBits, String, BytesRef) | Returns DocsAndPositionsEnum for the specified
field & term. This will return |
GetTermPositionsEnum(IndexReader, IBits, String, BytesRef, DocsAndPositionsFlags) | Returns DocsAndPositionsEnum for the specified
field & term, with control over whether offsets and payloads are
required. Some codecs may be able to optimize
their implementation when offsets and/or payloads are not
required. This will return |
GetTerms(IndexReader, String) | this method may return |
GetTerms(String) |