Package org.apache.lucene.backward_codecs.lucene90

## Class Lucene90PostingsWriter

- java.lang.Object
- - org.apache.lucene.codecs.PostingsWriterBase
  - - org.apache.lucene.codecs.PushPostingsWriterBase
    - - org.apache.lucene.backward_codecs.lucene90.Lucene90PostingsWriter

- All Implemented Interfaces:
    `Closeable`, `AutoCloseable`

      public final class Lucene90PostingsWriter
      extends PushPostingsWriterBase

  Concrete class that writes docId(maybe frq,pos,offset,payloads) list with postings format.

  Postings list for each term will be stored separately.

  See Also:
    `for details about skipping setting and postings layout.`
  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Field Summary

    - ### Fields inherited from class org.apache.lucene.codecs.PushPostingsWriterBase

      `fieldInfo, indexOptions, writeFreqs, writeOffsets, writePayloads, writePositions`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Lucene90PostingsWriter​(SegmentWriteState state)` | Creates a postings writer

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addPosition​(int position, BytesRef payload, int startOffset, int endOffset)` |
    `void` | `close()` |
    `void` | `encodeTerm​(DataOutput out, FieldInfo fieldInfo, BlockTermState _state, boolean absolute)` |
    `void` | `finishDoc()` |
    `void` | `finishTerm​(BlockTermState _state)` | Called when we are done adding docs to this term
    `void` | `init​(IndexOutput termsOut, SegmentWriteState state)` |
    `Lucene90PostingsFormat.IntBlockTermState` | `newTermState()` |
    `void` | `setField​(FieldInfo fieldInfo)` |
    `void` | `startDoc​(int docID, int termDocFreq)` |
    `void` | `startTerm​(NumericDocValues norms)` |

    - ### Methods inherited from class org.apache.lucene.codecs.PushPostingsWriterBase

      `writeTerm`

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

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

- - ### Constructor Detail

    - #### Lucene90PostingsWriter

          public Lucene90PostingsWriter​(SegmentWriteState state)
                                 throws IOException

      Creates a postings writer
      Throws:
        `IOException`

  - ### Method Detail

    - #### newTermState

          public Lucene90PostingsFormat.IntBlockTermState newTermState()

      Specified by:
        `newTermState` in class `PushPostingsWriterBase`

    - #### init

          public void init​(IndexOutput termsOut,
                           SegmentWriteState state)
                    throws IOException

      Specified by:
        `init` in class `PostingsWriterBase`
      Throws:
        `IOException`

    - #### setField

          public void setField​(FieldInfo fieldInfo)

      Overrides:
        `setField` in class `PushPostingsWriterBase`

    - #### startTerm

          public void startTerm​(NumericDocValues norms)

      Specified by:
        `startTerm` in class `PushPostingsWriterBase`

    - #### startDoc

          public void startDoc​(int docID,
                               int termDocFreq)
                        throws IOException

      Specified by:
        `startDoc` in class `PushPostingsWriterBase`
      Throws:
        `IOException`

    - #### addPosition

          public void addPosition​(int position,
                                  BytesRef payload,
                                  int startOffset,
                                  int endOffset)
                           throws IOException

      Specified by:
        `addPosition` in class `PushPostingsWriterBase`
      Throws:
        `IOException`

    - #### finishDoc

          public void finishDoc()
                         throws IOException

      Specified by:
        `finishDoc` in class `PushPostingsWriterBase`
      Throws:
        `IOException`

    - #### finishTerm

          public void finishTerm​(BlockTermState _state)
                          throws IOException

      Called when we are done adding docs to this term
      Specified by:
        `finishTerm` in class `PushPostingsWriterBase`
      Throws:
        `IOException`

    - #### encodeTerm

          public void encodeTerm​(DataOutput out,
                                 FieldInfo fieldInfo,
                                 BlockTermState _state,
                                 boolean absolute)
                          throws IOException

      Specified by:
        `encodeTerm` in class `PostingsWriterBase`
      Throws:
        `IOException`

    - #### close

          public void close()
                     throws IOException

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