Show / Hide Table of Contents

    Class FieldsConsumer

    Abstract API that consumes terms, doc, freq, prox, offset and payloads postings. Concrete implementations of this actually do "something" with the postings (write it into the index in a specific format).

    The lifecycle is:

    1. FieldsConsumer is created by FieldsConsumer(SegmentWriteState).
    2. For each field, AddField(FieldInfo) is called, returning a TermsConsumer for the field.
    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
    FieldsConsumer
    BlockTreeTermsWriter
    Namespace: Lucene.Net.Codecs
    Assembly: Lucene.Net.dll
    Syntax
    public abstract class FieldsConsumer : IDisposable

    Constructors

    | Improve this Doc View Source

    FieldsConsumer()

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

    Declaration
    protected FieldsConsumer()

    Methods

    | Improve this Doc View Source

    AddField(FieldInfo)

    Add a new field.

    Declaration
    public abstract TermsConsumer AddField(FieldInfo field)
    Parameters
    Type Name Description
    FieldInfo field
    Returns
    Type Description
    TermsConsumer
    | Improve this Doc View Source

    Dispose()

    Called when we are done adding everything.

    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

    Merge(MergeState, Fields)

    Called during merging to merge all Fields from sub-readers. this must recurse to merge all postings (terms, docs, positions, etc.). A PostingsFormat can override this default implementation to do its own merging.

    Declaration
    public virtual void Merge(MergeState mergeState, Fields fields)
    Parameters
    Type Name Description
    MergeState mergeState
    Fields fields
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)