Class FieldsConsumer

java.lang.Object
org.apache.lucene.codecs.FieldsConsumer
All Implemented Interfaces:
Closeable, AutoCloseable
Direct Known Subclasses:
BlockTreeTermsWriter

public abstract class FieldsConsumer extends Object implements Closeable
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 PostingsFormat.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 close()d.
  • Constructor Details

    • FieldsConsumer

      protected FieldsConsumer()
      Sole constructor. (For invocation by subclass constructors, typically implicit.)
  • Method Details