org.apache.lucene.codecs

## Class DocValuesProducer

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

- All Implemented Interfaces:
    Closeable, AutoCloseable, Accountable
  Direct Known Subclasses:
    EmptyDocValuesProducer

      public abstract class DocValuesProducer
      extends Object
      implements Closeable, Accountable

  Abstract API that produces numeric, binary, sorted, sortedset, and sortednumeric docvalues.
  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `DocValuesProducer()` 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
    `abstract BinaryDocValues` | `getBinary(FieldInfo field)` Returns `BinaryDocValues` for this field.
    `DocValuesProducer` | `getMergeInstance()` Returns an instance optimized for merging.
    `abstract NumericDocValues` | `getNumeric(FieldInfo field)` Returns `NumericDocValues` for this field.
    `abstract SortedDocValues` | `getSorted(FieldInfo field)` Returns `SortedDocValues` for this field.
    `abstract SortedNumericDocValues` | `getSortedNumeric(FieldInfo field)` Returns `SortedNumericDocValues` for this field.
    `abstract SortedSetDocValues` | `getSortedSet(FieldInfo field)` Returns `SortedSetDocValues` 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

    - #### DocValuesProducer

          protected DocValuesProducer()

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

  - ### Method Detail

    - #### getNumeric

          public abstract NumericDocValues getNumeric(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`

    - #### getBinary

          public abstract BinaryDocValues getBinary(FieldInfo field)
                                             throws IOException

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

    - #### getSorted

          public abstract SortedDocValues getSorted(FieldInfo field)
                                             throws IOException

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

    - #### getSortedNumeric

          public abstract SortedNumericDocValues getSortedNumeric(FieldInfo field)
                                                           throws IOException

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

    - #### getSortedSet

          public abstract SortedSetDocValues getSortedSet(FieldInfo field)
                                                   throws IOException

      Returns `SortedSetDocValues` 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 DocValuesProducer getMergeInstance()
                                             throws IOException

      Returns an instance optimized for merging.

      The default implementation returns `this`

      Throws:
        `IOException`

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