Show / Hide Table of Contents

    Class DocValuesConsumer

    Abstract API that consumes numeric, binary and sorted docvalues. Concrete implementations of this actually do "something" with the docvalues (write it into the index in a specific format).

    The lifecycle is:

    1. DocValuesConsumer is created by FieldsConsumer(SegmentWriteState) or NormsConsumer(SegmentWriteState).
    2. AddNumericField(FieldInfo, IEnumerable<Nullable<Int64>>), AddBinaryField(FieldInfo, IEnumerable<BytesRef>), or AddSortedField(FieldInfo, IEnumerable<BytesRef>, IEnumerable<Nullable<Int64>>) are called for each Numeric, Binary, or Sorted docvalues field. The API is a "pull" rather than "push", and the implementation is free to iterate over the values multiple times ().
    3. After all fields are added, the consumer is Dispose()d.

    This is a Lucene.NET EXPERIMENTAL API, use at your own risk
    Inheritance
    System.Object
    DocValuesConsumer
    Lucene45DocValuesConsumer
    Namespace: Lucene.Net.Codecs
    Assembly: Lucene.Net.dll
    Syntax
    public abstract class DocValuesConsumer : IDisposable

    Constructors

    | Improve this Doc View Source

    DocValuesConsumer()

    Sole constructor. (For invocation by subclass constructors, typically implicit.)

    Declaration
    protected DocValuesConsumer()

    Methods

    | Improve this Doc View Source

    AddBinaryField(FieldInfo, IEnumerable<BytesRef>)

    Writes binary docvalues for a field.

    Declaration
    public abstract void AddBinaryField(FieldInfo field, IEnumerable<BytesRef> values)
    Parameters
    Type Name Description
    FieldInfo field

    Field information.

    IEnumerable<BytesRef> values

    of binary values (one for each document). null indicates a missing value.

    | Improve this Doc View Source

    AddNumericField(FieldInfo, IEnumerable<Nullable<Int64>>)

    Writes numeric docvalues for a field.

    Declaration
    public abstract void AddNumericField(FieldInfo field, IEnumerable<long?> values)
    Parameters
    Type Name Description
    FieldInfo field

    Field information.

    IEnumerable<System.Nullable<System.Int64>> values

    of numeric values (one for each document). null indicates a missing value.

    | Improve this Doc View Source

    AddSortedField(FieldInfo, IEnumerable<BytesRef>, IEnumerable<Nullable<Int64>>)

    Writes pre-sorted binary docvalues for a field.

    Declaration
    public abstract void AddSortedField(FieldInfo field, IEnumerable<BytesRef> values, IEnumerable<long?> docToOrd)
    Parameters
    Type Name Description
    FieldInfo field

    Field information.

    IEnumerable<BytesRef> values

    of binary values in sorted order (deduplicated).

    IEnumerable<System.Nullable<System.Int64>> docToOrd

    of ordinals (one for each document). -1 indicates a missing value.

    | Improve this Doc View Source

    AddSortedSetField(FieldInfo, IEnumerable<BytesRef>, IEnumerable<Nullable<Int64>>, IEnumerable<Nullable<Int64>>)

    Writes pre-sorted set docvalues for a field

    Declaration
    public abstract void AddSortedSetField(FieldInfo field, IEnumerable<BytesRef> values, IEnumerable<long?> docToOrdCount, IEnumerable<long?> ords)
    Parameters
    Type Name Description
    FieldInfo field

    Field information.

    IEnumerable<BytesRef> values

    of binary values in sorted order (deduplicated).

    IEnumerable<System.Nullable<System.Int64>> docToOrdCount

    of the number of values for each document. A zero ordinal count indicates a missing value.

    IEnumerable<System.Nullable<System.Int64>> ords

    of ordinal occurrences (docToOrdCount*maxDoc total).

    | Improve this Doc View Source

    Dispose()

    Disposes all resources used by this object.

    Declaration
    public void Dispose()
    | Improve this Doc View Source

    Dispose(Boolean)

    Implementations must override and should dispose all resources used by this instance.

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

    MergeBinaryField(FieldInfo, MergeState, IList<BinaryDocValues>, IList<IBits>)

    Merges the binary docvalues from toMerge.

    The default implementation calls AddBinaryField(FieldInfo, IEnumerable<BytesRef>), passing an that merges and filters deleted documents on the fly.

    Declaration
    public virtual void MergeBinaryField(FieldInfo fieldInfo, MergeState mergeState, IList<BinaryDocValues> toMerge, IList<IBits> docsWithField)
    Parameters
    Type Name Description
    FieldInfo fieldInfo
    MergeState mergeState
    IList<BinaryDocValues> toMerge
    IList<IBits> docsWithField
    | Improve this Doc View Source

    MergeNumericField(FieldInfo, MergeState, IList<NumericDocValues>, IList<IBits>)

    Merges the numeric docvalues from toMerge.

    The default implementation calls AddNumericField(FieldInfo, IEnumerable<Nullable<Int64>>), passing an that merges and filters deleted documents on the fly.

    Declaration
    public virtual void MergeNumericField(FieldInfo fieldInfo, MergeState mergeState, IList<NumericDocValues> toMerge, IList<IBits> docsWithField)
    Parameters
    Type Name Description
    FieldInfo fieldInfo
    MergeState mergeState
    IList<NumericDocValues> toMerge
    IList<IBits> docsWithField
    | Improve this Doc View Source

    MergeSortedField(FieldInfo, MergeState, IList<SortedDocValues>)

    Merges the sorted docvalues from toMerge.

    The default implementation calls AddSortedField(FieldInfo, IEnumerable<BytesRef>, IEnumerable<Nullable<Int64>>), passing an that merges ordinals and values and filters deleted documents.

    Declaration
    public virtual void MergeSortedField(FieldInfo fieldInfo, MergeState mergeState, IList<SortedDocValues> toMerge)
    Parameters
    Type Name Description
    FieldInfo fieldInfo
    MergeState mergeState
    IList<SortedDocValues> toMerge
    | Improve this Doc View Source

    MergeSortedSetField(FieldInfo, MergeState, IList<SortedSetDocValues>)

    Merges the sortedset docvalues from toMerge.

    The default implementation calls AddSortedSetField(FieldInfo, IEnumerable<BytesRef>, IEnumerable<Nullable<Int64>>, IEnumerable<Nullable<Int64>>), passing an that merges ordinals and values and filters deleted documents.

    Declaration
    public virtual void MergeSortedSetField(FieldInfo fieldInfo, MergeState mergeState, IList<SortedSetDocValues> toMerge)
    Parameters
    Type Name Description
    FieldInfo fieldInfo
    MergeState mergeState
    IList<SortedSetDocValues> toMerge
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)