Class NormsConsumer

All Implemented Interfaces:
Closeable, AutoCloseable

public abstract class NormsConsumer extends Object implements Closeable
Abstract API that consumes normalization values. Concrete implementations of this actually do "something" with the norms (write it into the index in a specific format).

The lifecycle is:

  1. NormsConsumer is created by NormsFormat.normsConsumer(SegmentWriteState).
  2. addNormsField(org.apache.lucene.index.FieldInfo, org.apache.lucene.codecs.NormsProducer) is called for each field with normalization values. The API is a "pull" rather than "push", and the implementation is free to iterate over the values multiple times (Iterable.iterator()).
  3. After all fields are added, the consumer is Closeable.close()d.
WARNING: This API is experimental and might change in incompatible ways in the next release.