Fork me on GitHub
  • API

    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.

    Note

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

    Inheritance
    object
    FieldsConsumer
    BlockTreeTermsWriter<TSubclassState>
    Implements
    IDisposable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Codecs
    Assembly: Lucene.Net.dll
    Syntax
    public abstract class FieldsConsumer : IDisposable

    Constructors

    FieldsConsumer()

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

    Declaration
    protected FieldsConsumer()

    Methods

    AddField(FieldInfo)

    Add a new field.

    Declaration
    public abstract TermsConsumer AddField(FieldInfo field)
    Parameters
    Type Name Description
    FieldInfo field
    Returns
    Type Description
    TermsConsumer

    Dispose()

    Called when we are done adding everything.

    Declaration
    public void Dispose()

    Dispose(bool)

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

    Declaration
    protected abstract void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing

    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

    Implements

    IDisposable
    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.