Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class CachedOrdinalsReader

    A per-segment cache of documents' facet ordinals. Every CachedOrdinalsReader.CachedOrds holds the ordinals in a raw int[], and therefore consumes as much RAM as the total number of ordinals found in the segment, but saves the CPU cost of decoding ordinals during facet counting.

    NOTE: every CachedOrdinalsReader.CachedOrds is limited to 2.1B total ordinals. If that is a limitation for you then consider limiting the segment size to fewer documents, or use an alternative cache which pages through the category ordinals.

    NOTE: when using this cache, it is advised to use a Lucene.Net.Codecs.DocValuesFormat that does not cache the data in memory, at least for the category lists fields, or otherwise you'll be doing double-caching.

    NOTE: create one instance of this and re-use it for all facet implementations (the cache is per-instance, not static).

    Inheritance
    System.Object
    OrdinalsReader
    CachedOrdinalsReader
    Implements
    Lucene.Net.Util.IAccountable
    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()
    Namespace: Lucene.Net.Facet.Taxonomy
    Assembly: Lucene.Net.Facet.dll
    Syntax
    public class CachedOrdinalsReader : OrdinalsReader, IAccountable

    Constructors

    | Improve this Doc View Source

    CachedOrdinalsReader(OrdinalsReader)

    Sole constructor.

    Declaration
    public CachedOrdinalsReader(OrdinalsReader source)
    Parameters
    Type Name Description
    OrdinalsReader source

    Properties

    | Improve this Doc View Source

    IndexFieldName

    Declaration
    public override string IndexFieldName { get; }
    Property Value
    Type Description
    System.String
    Overrides
    OrdinalsReader.IndexFieldName

    Methods

    | Improve this Doc View Source

    GetReader(AtomicReaderContext)

    Declaration
    public override OrdinalsReader.OrdinalsSegmentReader GetReader(AtomicReaderContext context)
    Parameters
    Type Name Description
    Lucene.Net.Index.AtomicReaderContext context
    Returns
    Type Description
    OrdinalsReader.OrdinalsSegmentReader
    Overrides
    OrdinalsReader.GetReader(AtomicReaderContext)
    | Improve this Doc View Source

    RamBytesUsed()

    Declaration
    public virtual long RamBytesUsed()
    Returns
    Type Description
    System.Int64

    Implements

    Lucene.Net.Util.IAccountable
    • 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.