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.
This is a Lucene.NET EXPERIMENTAL API, use at your own risk
Inheritance
System.Object
MultiFields
Implements
System.Collections.Generic.IEnumerable<System.String>
System.Collections.IEnumerable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Lucene.Net.dll
Syntax
public sealed class MultiFields : Fields, IEnumerable<string>, IEnumerable
Constructors
|
Improve this Doc
View Source
MultiFields(Fields[], ReaderSlice[])
Expert: construct a new MultiFields instance directly.
This is a Lucene.NET INTERNAL API, use at your own risk
Declaration
public MultiFields(Fields[] subs, ReaderSlice[] subSlices)
Parameters
Properties
|
Improve this Doc
View Source
Count
Declaration
public override int Count { get; }
Property Value
Type |
Description |
System.Int32 |
|
Overrides
Methods
|
Improve this Doc
View Source
GetEnumerator()
Declaration
public override IEnumerator<string> GetEnumerator()
Returns
Type |
Description |
System.Collections.Generic.IEnumerator<System.String> |
|
Overrides
|
Improve this Doc
View Source
GetFields(IndexReader)
Returns a single Fields instance for this
reader, merging fields/terms/docs/positions on the
fly. This method will return null
if the reader
has no postings.
NOTE: this is a slow way to access postings.
It's better to get the sub-readers and iterate through them
yourself.
Declaration
public static Fields GetFields(IndexReader reader)
Parameters
Returns
|
Improve this Doc
View Source
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.
Declaration
public static ICollection<string> GetIndexedFields(IndexReader reader)
Parameters
Returns
Type |
Description |
System.Collections.Generic.ICollection<System.String> |
|
|
Improve this Doc
View Source
GetLiveDocs(IndexReader)
Returns a single IBits instance for this
reader, merging live Documents on the
fly. This method will return null
if the reader
has no deletions.
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.
Declaration
public static IBits GetLiveDocs(IndexReader reader)
Parameters
Returns
|
Improve this Doc
View Source
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.
Declaration
public static FieldInfos GetMergedFieldInfos(IndexReader reader)
Parameters
Returns
|
Improve this Doc
View Source
GetTermDocsEnum(IndexReader, IBits, String, BytesRef)
Returns DocsEnum for the specified field &
term. This will return null
if the field or term does
not exist.
Declaration
public static DocsEnum GetTermDocsEnum(IndexReader r, IBits liveDocs, string field, BytesRef term)
Parameters
Returns
|
Improve this Doc
View Source
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 null
if the field or term does not exist. See
Docs(IBits, DocsEnum, DocsFlags).
Declaration
public static DocsEnum GetTermDocsEnum(IndexReader r, IBits liveDocs, string field, BytesRef term, DocsFlags flags)
Parameters
Returns
|
Improve this Doc
View Source
GetTermPositionsEnum(IndexReader, IBits, String, BytesRef)
Returns DocsAndPositionsEnum for the specified
field & term. This will return null
if the field or
term does not exist or positions were not indexed.
Declaration
public static DocsAndPositionsEnum GetTermPositionsEnum(IndexReader r, IBits liveDocs, string field, BytesRef term)
Parameters
Returns
See Also
|
Improve this Doc
View Source
GetTermPositionsEnum(IndexReader, IBits, String, BytesRef, DocsAndPositionsFlags)
Declaration
public static DocsAndPositionsEnum GetTermPositionsEnum(IndexReader r, IBits liveDocs, string field, BytesRef term, DocsAndPositionsFlags flags)
Parameters
Returns
|
Improve this Doc
View Source
GetTerms(IndexReader, String)
this method may return null
if the field does not exist.
Declaration
public static Terms GetTerms(IndexReader r, string field)
Parameters
Type |
Name |
Description |
IndexReader |
r |
|
System.String |
field |
|
Returns
|
Improve this Doc
View Source
GetTerms(String)
Declaration
public override Terms GetTerms(string field)
Parameters
Type |
Name |
Description |
System.String |
field |
|
Returns
Overrides
Implements
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable