Lucene90CompressingStoredFieldsWriter (Lucene 10.5.0 core API)
Description: declaration: package: org.apache.lucene.codecs.lucene90.compressing, class: Lucene90CompressingStoredFieldsWriter

Package org.apache.lucene.codecs.lucene90.compressing

# Class Lucene90CompressingStoredFieldsWriter

java.lang.Object
org.apache.lucene.codecs.StoredFieldsWriter
org.apache.lucene.codecs.lucene90.compressing.Lucene90CompressingStoredFieldsWriter

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

public final class Lucene90CompressingStoredFieldsWriter extends StoredFieldsWriter
`StoredFieldsWriter` impl for `Lucene90CompressingStoredFieldsFormat`.

WARNING: This API is experimental and might change in incompatible ways in the next release.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class org.apache.lucene.codecs.StoredFieldsWriter

  `StoredFieldsWriter.MergeVisitor`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `FIELDS_EXTENSION`
  Extension of stored fields file
  `static final String`
  `INDEX_CODEC_NAME`
  Codec name for the index.
  `static final String`
  `INDEX_EXTENSION`
  Extension of stored fields index
  `static final String`
  `META_EXTENSION`
  Extension of stored fields meta

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

  `NULL_ACCOUNTABLE`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  `void`
  `finish(int numDocs)`
  Called before `StoredFieldsWriter.close()`, passing in the number of documents that were written.
  `void`
  `finishDocument()`
  Called when a document and all its fields have been added.
  `int`
  `merge(MergeState mergeState)`
  Merges in the stored fields from the readers in `mergeState`.
  `long`
  `ramBytesUsed()`
  Returns an estimate of the JVM heap memory used by this object in bytes.
  `void`
  `startDocument()`
  Called before writing the stored fields of the document.
  `void`
  `writeField(FieldInfo info, double value)`
  Writes a stored double value.
  `void`
  `writeField(FieldInfo info, float value)`
  Writes a stored float value.
  `void`
  `writeField(FieldInfo info, int value)`
  Writes a stored int value.
  `void`
  `writeField(FieldInfo info, long value)`
  Writes a stored long value.
  `void`
  `writeField(FieldInfo info, String value)`
  Writes a stored String value.
  `void`
  `writeField(FieldInfo info, StoredFieldDataInput value)`
  Writes a stored binary value from a `StoredFieldDataInput`.
  `void`
  `writeField(FieldInfo info, BytesRef value)`
  Writes a stored binary value.

  ### 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`

- ## Field Details

  - ### FIELDS_EXTENSION

    public static final String FIELDS_EXTENSION
    Extension of stored fields file
    See Also:
      - Constant Field Values

  - ### INDEX_EXTENSION

    public static final String INDEX_EXTENSION
    Extension of stored fields index
    See Also:
      - Constant Field Values

  - ### META_EXTENSION

    public static final String META_EXTENSION
    Extension of stored fields meta
    See Also:
      - Constant Field Values

  - ### INDEX_CODEC_NAME

    public static final String INDEX_CODEC_NAME
    Codec name for the index.
    See Also:
      - Constant Field Values

- ## Method Details

  - ### close

    public void close() throws IOException
    Specified by:
      `close` in interface `AutoCloseable`
    Specified by:
      `close` in interface `Closeable`
    Specified by:
      `close` in class `StoredFieldsWriter`
    Throws:
      `IOException`

  - ### startDocument

    public void startDocument() throws IOException
    Description copied from class: `StoredFieldsWriter`
    Called before writing the stored fields of the document. `writeField` will be called for each stored field. Note that this is called even if the document has no stored fields.
    Specified by:
      `startDocument` in class `StoredFieldsWriter`
    Throws:
      `IOException`

  - ### finishDocument

    public void finishDocument() throws IOException
    Description copied from class: `StoredFieldsWriter`
    Called when a document and all its fields have been added.
    Overrides:
      `finishDocument` in class `StoredFieldsWriter`
    Throws:
      `IOException`

  - ### writeField

    public void writeField(FieldInfo info, int value) throws IOException
    Description copied from class: `StoredFieldsWriter`
    Writes a stored int value.
    Specified by:
      `writeField` in class `StoredFieldsWriter`
    Throws:
      `IOException`

  - ### writeField

    public void writeField(FieldInfo info, long value) throws IOException
    Description copied from class: `StoredFieldsWriter`
    Writes a stored long value.
    Specified by:
      `writeField` in class `StoredFieldsWriter`
    Throws:
      `IOException`

  - ### writeField

    public void writeField(FieldInfo info, float value) throws IOException
    Description copied from class: `StoredFieldsWriter`
    Writes a stored float value.
    Specified by:
      `writeField` in class `StoredFieldsWriter`
    Throws:
      `IOException`

  - ### writeField

    public void writeField(FieldInfo info, double value) throws IOException
    Description copied from class: `StoredFieldsWriter`
    Writes a stored double value.
    Specified by:
      `writeField` in class `StoredFieldsWriter`
    Throws:
      `IOException`

  - ### writeField

    public void writeField(FieldInfo info, BytesRef value) throws IOException
    Description copied from class: `StoredFieldsWriter`
    Writes a stored binary value.
    Specified by:
      `writeField` in class `StoredFieldsWriter`
    Throws:
      `IOException`

  - ### writeField

    public void writeField(FieldInfo info, StoredFieldDataInput value) throws IOException
    Description copied from class: `StoredFieldsWriter`
    Writes a stored binary value from a `StoredFieldDataInput`.
    Overrides:
      `writeField` in class `StoredFieldsWriter`
    Throws:
      `IOException`

  - ### writeField

    public void writeField(FieldInfo info, String value) throws IOException
    Description copied from class: `StoredFieldsWriter`
    Writes a stored String value.
    Specified by:
      `writeField` in class `StoredFieldsWriter`
    Throws:
      `IOException`

  - ### finish

    public void finish(int numDocs) throws IOException
    Description copied from class: `StoredFieldsWriter`
    Called before `StoredFieldsWriter.close()`, passing in the number of documents that were written. Note that this is intentionally redundant (equivalent to the number of calls to `StoredFieldsWriter.startDocument()`, but a Codec should check that this is the case to detect the JRE bug described in LUCENE-1282.
    Specified by:
      `finish` in class `StoredFieldsWriter`
    Throws:
      `IOException`

  - ### merge

    public int merge(MergeState mergeState) throws IOException
    Description copied from class: `StoredFieldsWriter`
    Merges in the stored fields from the readers in `mergeState`. The default implementation skips over deleted documents, and uses `StoredFieldsWriter.startDocument()`, `writeField`, and `StoredFieldsWriter.finish(int)`, returning the number of documents that were written. Implementations can override this method for more sophisticated merging (bulk-byte copying, etc).
    Overrides:
      `merge` in class `StoredFieldsWriter`
    Throws:
      `IOException`

  - ### ramBytesUsed

    public long ramBytesUsed()
    Description copied from interface: `Accountable`
    Returns an estimate of the JVM heap memory used by this object in bytes. The method name uses "ram" for historical reasons; only JVM heap memory should be reported. Off-heap resources such as memory-mapped files or native direct buffers should not be included. Negative values are illegal.