FieldInvertState

class FieldInvertState(val indexCreatedVersionMajor: Int, val name: String?, val indexOptions: IndexOptions?)

This class tracks the number and position / offset parameters of terms being added to the index. The information collected in this class is also used to calculate the normalization factor for a field.

Constructors

Link copied to clipboard
constructor(indexCreatedVersionMajor: Int, name: String?, indexOptions: IndexOptions?)
constructor(indexCreatedVersionMajor: Int, name: String?, indexOptions: IndexOptions?, position: Int, length: Int, numOverlap: Int, offset: Int, maxTermFrequency: Int, uniqueTermCount: Int)

Creates {code FieldInvertState} for the specified field name and values for all fields.

Properties

Link copied to clipboard
Link copied to clipboard

Return the version that was used to create the index, or 6 if it was created before 7.0.

Link copied to clipboard

Get the index options for this field

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var length: Int

Set length value.

Link copied to clipboard

Get the maximum term-frequency encountered for any term in the field. A field containing "the quick brown fox jumps over the lazy dog" would have a value of 2, because "the" appears twice.

Link copied to clipboard
val name: String?

Return the field's name

Link copied to clipboard

Set number of terms with positionIncrement == 0.

Link copied to clipboard
var offset: Int

Get end offset of the last processed term.

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

Get the last processed term position.

Link copied to clipboard
Link copied to clipboard

Return the number of unique terms encountered in this field.

Functions

Link copied to clipboard
fun reset()

Re-initialize the state