Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class BlockTreeTermsReader

    A block-based terms index and dictionary that assigns terms to variable length blocks according to how they share prefixes. The terms index is a prefix trie whose leaves are term blocks. The advantage of this approach is that SeekExact() is often able to determine a term cannot exist without doing any IO, and intersection with Automata is very fast. Note that this terms dictionary has it's own fixed terms index (ie, it does not support a pluggable terms index implementation).

    NOTE: this terms dictionary does not support index divisor when opening an IndexReader. Instead, you can change the min/maxItemsPerBlock during indexing.

    The data structure used by this implementation is very similar to a burst trie (http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.18.3499), but with added logic to break up too-large blocks of all terms sharing a given prefix into smaller ones.

    Use CheckIndex with the -verbose option to see summary statistics on the blocks in the dictionary.

    See BlockTreeTermsWriter.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Inheritance
    System.Object
    Fields
    FieldsProducer
    BlockTreeTermsReader
    Implements
    System.Collections.Generic.IEnumerable<System.String>
    System.Collections.IEnumerable
    System.IDisposable
    Inherited Members
    FieldsProducer.Dispose()
    Fields.IEnumerable.GetEnumerator()
    Fields.UniqueTermCount
    Fields.EMPTY_ARRAY
    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()
    Namespace: Lucene.Net.Codecs
    Assembly: Lucene.Net.dll
    Syntax
    public class BlockTreeTermsReader : FieldsProducer, IEnumerable<string>, IEnumerable, IDisposable

    Constructors

    | Improve this Doc View Source

    BlockTreeTermsReader(Directory, FieldInfos, SegmentInfo, PostingsReaderBase, IOContext, String, Int32)

    Sole constructor.

    Declaration
    public BlockTreeTermsReader(Directory dir, FieldInfos fieldInfos, SegmentInfo info, PostingsReaderBase postingsReader, IOContext ioContext, string segmentSuffix, int indexDivisor)
    Parameters
    Type Name Description
    Directory dir
    FieldInfos fieldInfos
    SegmentInfo info
    PostingsReaderBase postingsReader
    IOContext ioContext
    System.String segmentSuffix
    System.Int32 indexDivisor

    Properties

    | Improve this Doc View Source

    Count

    Declaration
    public override int Count { get; }
    Property Value
    Type Description
    System.Int32
    Overrides
    Fields.Count

    Methods

    | Improve this Doc View Source

    CheckIntegrity()

    Declaration
    public override void CheckIntegrity()
    Overrides
    FieldsProducer.CheckIntegrity()
    | Improve this Doc View Source

    Dispose(Boolean)

    Disposes all resources used by this object.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing
    Overrides
    FieldsProducer.Dispose(Boolean)
    | Improve this Doc View Source

    GetEnumerator()

    Declaration
    public override IEnumerator<string> GetEnumerator()
    Returns
    Type Description
    System.Collections.Generic.IEnumerator<System.String>
    Overrides
    Fields.GetEnumerator()
    | Improve this Doc View Source

    GetTerms(String)

    Declaration
    public override Terms GetTerms(string field)
    Parameters
    Type Name Description
    System.String field
    Returns
    Type Description
    Terms
    Overrides
    Fields.GetTerms(String)
    | Improve this Doc View Source

    RamBytesUsed()

    Declaration
    public override long RamBytesUsed()
    Returns
    Type Description
    System.Int64
    Overrides
    FieldsProducer.RamBytesUsed()
    | Improve this Doc View Source

    ReadHeader(IndexInput)

    Reads terms file header.

    Declaration
    protected virtual int ReadHeader(IndexInput input)
    Parameters
    Type Name Description
    IndexInput input
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    ReadIndexHeader(IndexInput)

    Reads index file header.

    Declaration
    protected virtual int ReadIndexHeader(IndexInput input)
    Parameters
    Type Name Description
    IndexInput input
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    SeekDir(IndexInput, Int64)

    Seek input to the directory offset.

    Declaration
    protected virtual void SeekDir(IndexInput input, long dirOffset)
    Parameters
    Type Name Description
    IndexInput input
    System.Int64 dirOffset

    Implements

    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable
    System.IDisposable
    • Improve this Doc
    • View Source
    Back to top Copyright © 2022 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.