TextIndexDefinition class final

One full-text index on a collection field.

Constructors

TextIndexDefinition({required int collectionId, required int fieldId, required int indexId, required Tokenizer tokenizer, bool ready = true})
Creates a definition.
const

Properties

collectionId → int
Owning collection.
final
fieldId → int
Indexed field holding the text.
final
hashCode → int
The hash code for this object.
no setterinherited
indexId → int
Two-byte namespace in the engine.
final
ready → bool
Whether every existing document has been backfilled into this index.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tokenizer → Tokenizer
Term splitter.
final

Methods

entryKey(String term, Uint8List primaryKey) → Uint8List
Full posting key for term and primaryKey.
namespace() → Uint8List
Namespace prefix of this index.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
termPrefix(String term) → Uint8List
Prefix shared by all postings of term (terminator included).
tokenize(String text) → List<String>
Tokenizes text with this index's tokenizer.
toString() → String
A string representation of this object.
inherited
withReady(bool value) → TextIndexDefinition
Returns a copy with ready changed.

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

termPrefixLength(String term) → int
Length of the encoded term prefix, used to slice the primary key.