Class LongColumn

java.lang.Object
org.apache.lucene.document.column.Column
org.apache.lucene.document.column.LongColumn

public abstract class LongColumn extends Column
A Column that provides long values. Used for NUMERIC and SORTED_NUMERIC doc values and for stored numeric fields.

Iteration is performed via cursors. tuples() is always available and yields (docID, longValue) pairs. values() is a bulk cursor over consecutive doc-ids; it must be overridden when Column.density() is DENSE and is only consulted in that case.

numericKind() marks how the long bits should be interpreted. Defaults to LONG; pass INT (low 32 bits, sign-extended), FLOAT (low 32 bits encoded via NumericUtils.floatToSortableInt(float)), or DOUBLE (full 64 bits encoded via NumericUtils.doubleToSortableLong(double)) to the constructor to select another interpretation. Callers are responsible for producing the sortable encoding; doc values writes the long unchanged, points consumes it as sortable bytes, and stored fields round-trips it back to float/double via NumericUtils.sortableIntToFloat(int) / NumericUtils.sortableLongToDouble(long). The numeric kind drives the default storedType().

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