FieldInfo

class FieldInfo(val name: String, val number: Int, storeTermVector: Boolean, omitNorms: Boolean, storePayloads: Boolean, indexOptions: IndexOptions, docValues: DocValuesType, docValuesSkipIndex: DocValuesSkipIndexType, dvGen: Long, attributes: Map<String, String>, pointDimensionCount: Int, pointIndexDimensionCount: Int, pointNumBytes: Int, vectorDimension: Int, vectorEncoding: VectorEncoding, vectorSimilarityFunction: VectorSimilarityFunction, softDeletesField: Boolean, isParentField: Boolean)

Access to the Field Info file that describes document fields and whether or not they are indexed. Each segment has a separate Field Info file. Objects of this class are thread-safe for multiple readers, but only one thread can be adding documents at a time, with no other reader or writer threads accessing this object.

Constructors

Link copied to clipboard
constructor(name: String, number: Int, storeTermVector: Boolean, omitNorms: Boolean, storePayloads: Boolean, indexOptions: IndexOptions, docValues: DocValuesType, docValuesSkipIndex: DocValuesSkipIndexType, dvGen: Long, attributes: Map<String, String>, pointDimensionCount: Int, pointIndexDimensionCount: Int, pointNumBytes: Int, vectorDimension: Int, vectorEncoding: VectorEncoding, vectorSimilarityFunction: VectorSimilarityFunction, softDeletesField: Boolean, isParentField: Boolean)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard

Returns DocValuesType of the docValues; this is DocValuesType.NONE if the field has no docvalues.

Link copied to clipboard

Returns IndexOptions for the field, or IndexOptions.NONE if the field is not indexed

Link copied to clipboard

Returns true if this field is configured and used as the parent document field field. See IndexWriterConfig.setParentField

Link copied to clipboard

Returns true if this field is configured and used as the soft-deletes field. See

Link copied to clipboard

Returns name of this field

Link copied to clipboard
val number: Int

Returns the field number

Link copied to clipboard

If both of these are positive it means this field indexed points (see [ ]).

Link copied to clipboard

Return point data dimension count

Link copied to clipboard

Return number of bytes per dimension

Link copied to clipboard

Returns the number of dimensions of the vector value

Link copied to clipboard

Returns the number of dimensions of the vector value

Functions

Link copied to clipboard

Returns internal codec attributes map.

Link copied to clipboard

Check correctness of the FieldInfo options

Link copied to clipboard

Returns true if, and only if, this field has a skip index.

Link copied to clipboard

Get a codec attribute value, or null if it does not exist

Link copied to clipboard

Returns true if this field actually has any norms.

Link copied to clipboard

Returns true if any payloads exist for this field.

Link copied to clipboard

Returns true if any term vectors exist for this field.

Link copied to clipboard

Returns whether any (numeric) vector values exist for this field

Link copied to clipboard

Returns true if norms are explicitly omitted for this field

Link copied to clipboard
fun putAttribute(key: String, value: String): String?

Puts a codec attribute value.

Link copied to clipboard

Omit norms for this field.

Link copied to clipboard
fun setPointDimensions(dimensionCount: Int, indexDimensionCount: Int, numBytes: Int)

Record that this field is indexed with points, with the specified number of dimensions and bytes per dimension.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Verify that the provided FieldInfo has the same schema as this FieldInfo