Fork me on GitHub
  • API

    Show / Hide Table of Contents

    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.

    Inheritance
    object
    Fields
    FieldsProducer
    BlockTermsReader
    Implements
    IEnumerable<string>
    IEnumerable
    IDisposable
    Inherited Members
    FieldsProducer.Dispose()
    Fields.UniqueTermCount
    Fields.EMPTY_ARRAY
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    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
    Lucene.Net.Index.Fields.Count

    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
    Lucene.Net.Codecs.FieldsProducer.CheckIntegrity()

    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
    FieldsProducer.Dispose(bool)

    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
    Lucene.Net.Index.Fields.GetEnumerator()

    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
    Fields.GetTerms(string)

    RamBytesUsed()

    Returns approximate RAM bytes used.

    Declaration
    public override long RamBytesUsed()
    Returns
    Type Description
    long
    Overrides
    Lucene.Net.Codecs.FieldsProducer.RamBytesUsed()

    Implements

    IEnumerable<T>
    IEnumerable
    IDisposable
    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.