NormsConsumer
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:
NormsConsumer is created by NormsFormat.normsConsumer.
.addNormsField 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).
After all fields are added, the consumer is .closed.
Functions
Writes normalization values for a field.
Merges in the fields from the readers in mergeState. The default implementation calls .mergeNormsField for each field, filling segments with missing norms for the field with zeros. Implementations can override this method for more sophisticated merging (bulk-byte copying, etc).
Merges the norms from toMerge.