of

fun of(value: Variant): IndexTerm?

The term value would be indexed under, or null if it would not be indexed at all.

null for a JSON null and for containers, matching what the writer does — a document carrying one of those has the path, which existence reports, but there is no value to look it up by.


fun of(value: Variant, options: IndexOptions): IndexTerm?

The term value is keyed under given options, or null if it is not keyed at all.

null for a JSON null, for a container, and for a value above IndexOptions.maxTermBytes — all three are present and none of them is keyed. The bound is applied here so that the writer, the reader and a query's recheck cannot drift apart about which values a dictionary can spell; a query that skipped it would take a false negative from an index that dropped the value on the way in.