org.apache.lucene.codecs

## Class NormsProducer

- java.lang.Object
- - org.apache.lucene.codecs.NormsProducer

- All Implemented Interfaces:
    Closeable, AutoCloseable, Accountable

      public abstract class NormsProducer
      extends Object
      implements Closeable, Accountable

  Abstract API that produces field normalization values
  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `NormsProducer()` Sole constructor.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract void` | `checkIntegrity()` Checks consistency of this producer
    `NormsProducer` | `getMergeInstance()` Returns an instance optimized for merging.
    `abstract NumericDocValues` | `getNorms(FieldInfo field)` Returns `NumericDocValues` for this field.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface java.io.Closeable

      `close`

    - ### Methods inherited from interface org.apache.lucene.util.Accountable

      `getChildResources, ramBytesUsed`

- - ### Constructor Detail

    - #### NormsProducer

          protected NormsProducer()

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

  - ### Method Detail

    - #### getNorms

          public abstract NumericDocValues getNorms(FieldInfo field)
                                             throws IOException

      Returns `NumericDocValues` for this field. The returned instance need not be thread-safe: it will only be used by a single thread.
      Throws:
        `IOException`

    - #### checkIntegrity

          public abstract void checkIntegrity()
                                       throws IOException

      Checks consistency of this producer

      Note that this may be costly in terms of I/O, e.g. may involve computing a checksum value against large data files.

      Throws:
        `IOException`
      NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

    - #### getMergeInstance

          public NormsProducer getMergeInstance()

      Returns an instance optimized for merging. This instance may only be used from the thread that acquires it.

      The default implementation returns `this`

Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.