IndexTerm

A value, as the index keys it.

This is ValueSignature wearing a type, and the type exists so that a query cannot accidentally ask for a term spelled some other way. Two consequences a caller should know about, both inherited and both deliberate:

Numbers are canonical across widths. 1, 1.0 and 1.00 are one term, so a query written with an integer finds documents that stored a double. Anything else would make the answer depend on how a JSON writer happened to render the value.

The order is a lookup order, not a value order. compareTo sorts by tag and then by bytes, so 10 sorts before 9. That is what the term dictionary needs to bisect and it is not something a range predicate may be built on. An inverted index answers equality, IN and existence; ordered skipping is what a shredded column is for, and the day one exists it will carry its own ordering.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val size: Int

Bytes this term occupies. Compared against IndexOptions.maxTermBytes before it is looked up.

Functions

Link copied to clipboard
open operator override fun compareTo(other: IndexTerm): Int
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String