Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class DirectDocValuesFormat

    In-memory docvalues format that does no (or very little) compression. Indexed values are stored on disk, but then at search time all values are loaded into memory as simple .NET arrays. For numeric values, it uses byte[], short[], int[], long[] as necessary to fit the range of the values. For binary values, there is an int (4 bytes) overhead per value.

    Limitations:

    • For binary and sorted fields the total space required for all binary values cannot exceed about 2.1 GB (see MAX_TOTAL_BYTES_LENGTH).
    • For sorted set fields, the sum of the size of each document's set of values cannot exceed about 2.1 B values (see MAX_SORTED_SET_ORDS). For example, if every document has 10 values (10 instances of Lucene.Net.Documents.SortedSetDocValuesField) added, then no more than ~210 M documents can be added to one segment.
    Inheritance
    object
    DocValuesFormat
    DirectDocValuesFormat
    Inherited Members
    DocValuesFormat.SetDocValuesFormatFactory(IDocValuesFormatFactory)
    DocValuesFormat.GetDocValuesFormatFactory()
    DocValuesFormat.Name
    DocValuesFormat.ToString()
    DocValuesFormat.ForName(string)
    DocValuesFormat.AvailableDocValuesFormats
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Lucene.Net.Codecs.Memory
    Assembly: Lucene.Net.Codecs.dll
    Syntax
    [DocValuesFormatName("Direct")]
    public class DirectDocValuesFormat : DocValuesFormat

    Constructors

    DirectDocValuesFormat()

    Sole constructor.

    Declaration
    public DirectDocValuesFormat()

    Fields

    MAX_SORTED_SET_ORDS

    The sum of the number of values across all documents in a sorted set field cannot exceed this.

    Declaration
    public static readonly int MAX_SORTED_SET_ORDS
    Field Value
    Type Description
    int

    MAX_TOTAL_BYTES_LENGTH

    The sum of all byte lengths for binary field, or for the unique values in sorted or sorted set fields, cannot exceed this.

    Declaration
    public static readonly int MAX_TOTAL_BYTES_LENGTH
    Field Value
    Type Description
    int

    Methods

    FieldsConsumer(SegmentWriteState)

    Returns a Lucene.Net.Codecs.DocValuesConsumer to write docvalues to the index.

    Declaration
    public override DocValuesConsumer FieldsConsumer(SegmentWriteState state)
    Parameters
    Type Name Description
    SegmentWriteState state
    Returns
    Type Description
    DocValuesConsumer
    Overrides
    Lucene.Net.Codecs.DocValuesFormat.FieldsConsumer(Lucene.Net.Index.SegmentWriteState)

    FieldsProducer(SegmentReadState)

    Returns a Lucene.Net.Codecs.DocValuesProducer to read docvalues from the index.

    NOTE: by the time this call returns, it must hold open any files it will need to use; else, those files may be deleted. Additionally, required files may be deleted during the execution of this call before there is a chance to open them. Under these circumstances an IOException should be thrown by the implementation. IOExceptions are expected and will automatically cause a retry of the segment opening logic with the newly revised segments.
    Declaration
    public override DocValuesProducer FieldsProducer(SegmentReadState state)
    Parameters
    Type Name Description
    SegmentReadState state
    Returns
    Type Description
    DocValuesProducer
    Overrides
    Lucene.Net.Codecs.DocValuesFormat.FieldsProducer(Lucene.Net.Index.SegmentReadState)
    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.