org.apache.lucene.codecs

## Class FieldsProducer

- java.lang.Object
- - org.apache.lucene.index.Fields
  - - org.apache.lucene.codecs.FieldsProducer

- All Implemented Interfaces:
    Closeable, AutoCloseable, Iterable<String>, Accountable
  Direct Known Subclasses:
    BlockTreeTermsReader

      public abstract class FieldsProducer
      extends Fields
      implements Closeable, Accountable

  Abstract API that produces terms, doc, freq, prox, offset and payloads postings.
  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Field Summary

    - ### Fields inherited from class org.apache.lucene.index.Fields

      `EMPTY_ARRAY`

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

      `NULL_ACCOUNTABLE`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `FieldsProducer()` 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 reader.
    `abstract void` | `close()`
    `FieldsProducer` | `getMergeInstance()` Returns an instance optimized for merging.

    - ### Methods inherited from class org.apache.lucene.index.Fields

      `iterator, size, terms`

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

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

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

      `getChildResources, ramBytesUsed`

    - ### Methods inherited from interface java.lang.Iterable

      `forEach, spliterator`

- - ### Constructor Detail

    - #### FieldsProducer

          protected FieldsProducer()

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

  - ### Method Detail

    - #### close

          public abstract void close()
                              throws IOException

      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`
      Throws:
        `IOException`

    - #### checkIntegrity

          public abstract void checkIntegrity()
                                       throws IOException

      Checks consistency of this reader.

      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 FieldsProducer getMergeInstance()

      Returns an instance optimized for merging. This instance may only be consumed in the thread that called `getMergeInstance()`.

      The default implementation returns `this`

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