Class VectorColumn<T>

java.lang.Object
org.apache.lucene.document.column.Column
org.apache.lucene.document.column.VectorColumn<T>
Type Parameters:
T - the vector array type, either float[] or byte[]

public abstract class VectorColumn<T> extends Column
A Column that provides KNN vector values via a tuple cursor. Vector columns are vector-only: the field type must declare vectorDimension() > 0, and must not also set doc values, points, stored, or indexOptions. Vectors are single-valued, so the cursor yields strictly increasing batch-local doc-ids.

The type parameter T must match IndexableFieldType.vectorEncoding(): float[] for FLOAT32 and byte[] for BYTE. A mismatch is reported as a ClassCastException when values are consumed during indexing.

DENSE indicates that every batch-local doc has a vector; SPARSE allows gaps. Both densities use the same tuple cursor — there is no dense bulk-fill fast path for vectors.

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

  • Method Details

    • tuples

      public abstract ObjectTupleCursor<T> tuples()
      Returns a fresh tuple cursor starting at the beginning of the batch.