PointsWriter (Lucene 10.5.1 core API)
Description: declaration: package: org.apache.lucene.codecs, class: PointsWriter

Package org.apache.lucene.codecs

# Class PointsWriter

java.lang.Object
org.apache.lucene.codecs.PointsWriter

All Implemented Interfaces:
  `Closeable`, `AutoCloseable`

Direct Known Subclasses:
  `Lucene90PointsWriter`

public abstract class PointsWriter extends Object implements Closeable
Abstract API to write points

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

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `PointsWriter()`
  Sole constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `abstract void`
  `finish()`
  Called once at the end before close
  `void`
  `merge(MergeState mergeState)`
  Default merge implementation to merge incoming points readers by visiting all their points and adding to this writer
  `protected void`
  `mergeOneField(MergeState mergeState, FieldInfo fieldInfo)`
  Default naive merge implementation for one field: it just re-indexes all the values from the incoming segment.
  `abstract void`
  `writeField(FieldInfo fieldInfo, PointsReader values)`
  Write all values contained in the provided reader

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

- ## Constructor Details

  - ### PointsWriter

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

- ## Method Details

  - ### writeField

    public abstract void writeField(FieldInfo fieldInfo, PointsReader values) throws IOException
    Write all values contained in the provided reader
    Throws:
      `IOException`

  - ### mergeOneField

    protected void mergeOneField(MergeState mergeState, FieldInfo fieldInfo) throws IOException
    Default naive merge implementation for one field: it just re-indexes all the values from the incoming segment. The default codec overrides this for 1D fields and uses a faster but more complex implementation.
    Throws:
      `IOException`

  - ### merge

    public void merge(MergeState mergeState) throws IOException
    Default merge implementation to merge incoming points readers by visiting all their points and adding to this writer
    Throws:
      `IOException`

  - ### finish

    public abstract void finish() throws IOException
    Called once at the end before close
    Throws:
      `IOException`