Class Column

java.lang.Object
org.apache.lucene.document.column.Column
Direct Known Subclasses:
BinaryColumn, DictionaryColumn, LongColumn, TokenStreamColumn, VectorColumn

public abstract class Column extends Object
A single field's values across multiple documents in a ColumnBatch. A Column carries only metadata (name, field type, and density); iteration is performed via cursors obtained from LongColumn, BinaryColumn, or VectorColumn.

Each call that requests a cursor returns a fresh cursor positioned at the first value, so columns can be consumed multiple times (for example, once in the row-oriented pass for stored fields and again in the column-oriented pass for doc values).

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

    • Column

      protected Column(String name, IndexableFieldType fieldType, Column.Density density)
      Creates a Column with the given field name, type, and density.
      Parameters:
      name - the field name
      fieldType - describes how this field should be indexed
      density - whether this column has a value for every document in the batch
  • Method Details

    • name

      public String name()
      Returns the field name.
    • fieldType

      public IndexableFieldType fieldType()
      Returns the field type describing how this field is indexed.
    • density

      public Column.Density density()
      Returns the density of this column (whether every doc has a value).