Class BlockTermsReader
Handles a terms dict, but decouples all details of doc/freqs/positions reading to an instance of Lucene.Net.Codecs.PostingsReaderBase. This class is reusable for codecs that use a different format for docs/freqs/positions (though codecs are also free to make their own terms dict impl).
This class also interacts with an instance of TermsIndexReaderBase, to abstract away the specific implementation of the terms dict index.Note
This API is experimental and might change in incompatible ways in the next release.
Inherited Members
Namespace: Lucene.Net.Codecs.BlockTerms
Assembly: Lucene.Net.Codecs.dll
Syntax
public class BlockTermsReader : FieldsProducer, IEnumerable<string>, IEnumerable, IDisposable
Constructors
BlockTermsReader(TermsIndexReaderBase, Directory, FieldInfos, SegmentInfo, PostingsReaderBase, IOContext, string)
Handles a terms dict, but decouples all details of doc/freqs/positions reading to an instance of Lucene.Net.Codecs.PostingsReaderBase. This class is reusable for codecs that use a different format for docs/freqs/positions (though codecs are also free to make their own terms dict impl).
This class also interacts with an instance of TermsIndexReaderBase, to abstract away the specific implementation of the terms dict index.Note
This API is experimental and might change in incompatible ways in the next release.
Declaration
public BlockTermsReader(TermsIndexReaderBase indexReader, Directory dir, FieldInfos fieldInfos, SegmentInfo info, PostingsReaderBase postingsReader, IOContext context, string segmentSuffix)
Parameters
Type | Name | Description |
---|---|---|
TermsIndexReaderBase | indexReader | |
Directory | dir | |
FieldInfos | fieldInfos | |
SegmentInfo | info | |
PostingsReaderBase | postingsReader | |
IOContext | context | |
string | segmentSuffix |
Properties
Count
Gets the number of fields or -1 if the number of distinct field names is unknown. If >= 0, Lucene.Net.Index.Fields.GetEnumerator() will return as many field names.
NOTE: This was size() in Lucene.Declaration
public override int Count { get; }
Property Value
Type | Description |
---|---|
int |
Overrides
Methods
CheckIntegrity()
Checks consistency of this reader.
Note that this may be costly in terms of I/O, e.g. may involve computing a checksum value against large data files.Note
This API is for internal purposes only and might change in incompatible ways in the next release.
Declaration
public override void CheckIntegrity()
Overrides
Dispose(bool)
Implementations must override and should dispose all resources used by this instance.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing |
Overrides
GetEnumerator()
Returns an enumerator that will step through all field
names. This will not return null
.
Declaration
public override IEnumerator<string> GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator<string> |
Overrides
GetTerms(string)
Get the Lucene.Net.Index.Terms for this field. This will return
null
if the field does not exist.
Declaration
public override Terms GetTerms(string field)
Parameters
Type | Name | Description |
---|---|---|
string | field |
Returns
Type | Description |
---|---|
Terms |
Overrides
RamBytesUsed()
Returns approximate RAM bytes used.
Declaration
public override long RamBytesUsed()
Returns
Type | Description |
---|---|
long |