prefix

Return an IntervalsSource over the disjunction of all terms that begin with a prefix

Throws

if the prefix expands to more than DEFAULT_MAX_EXPANSIONS terms


fun prefix(prefix: BytesRef, maxExpansions: Int): IntervalsSource

Expert: Return an IntervalsSource over the disjunction of all terms that begin with a prefix

WARNING: Setting `maxExpansions` to higher than the default value of [DEFAULT_MAX_EXPANSIONS] can be both slow and memory-intensive

Parameters

prefix

the prefix to expand

maxExpansions

the maximum number of terms to expand to

Throws

if the prefix expands to more than maxExpansions terms