Expand description
Tantivy schema for the text index.
One document per distinct string-literal term:
| field | type | content |
|---|---|---|
term | bytes, fast | encoded EncodedTerm; the candidate payload |
text | text, configured analyzer | full lexical, for text:query |
text_begin | text, raw tokenizer | first seed_chars characters |
text_end | text, raw tokenizer | reversed last seed_chars characters |
lang | text, raw tokenizer | language tag, or LANG_NONE |
text_begin and text_end hold whole strings, not tokens, so a prefix
query over them is string-prefix matching. The suffix field is reversed so
that a suffix query is a prefix query on the reversed seed and the FST term
dictionary can seek it; without the reversal a suffix query would have to
walk the whole term dictionary.
Structs§
- Text
Schema - Resolved fields of one index, so callers never look them up by name.
Constants§
- FIELD_
KEY - Logical document identity
(predicate, literal)(indexed;delete_termtarget for the upsert). - FIELD_
LANG - Language tag (raw), or
LANG_NONE. - FIELD_
PREDICATE - Encoded predicate term (indexed; the predicate-scoping dimension).
- FIELD_
TERM - Encoded term bytes (fast field).
- FIELD_
TEXT - Analyzed full lexical, used by
text:query. - FIELD_
TEXT_ BEGIN - Bounded forward prefix of the lexical.
- FIELD_
TEXT_ END - Bounded reversed suffix of the lexical.
- MAX_
ANALYZED_ TOKEN_ BYTES - Longest token the analyzers emit, in bytes. Tokens longer than this are
dropped, which is the standard full-text behaviour for unbroken blobs and
only affects
text:query(the bounded prefix/suffix fields are raw and truncated to the seed length separately).
Functions§
- build
- Build the schema for
analyzer(a menu value ofwaratah_storage::text_index::ANALYZERS). - from_
index - Resolve the schema of an already-open index.
- language_
value - The sentinel stored in
langfor a literal without a language tag. - register_
analyzers - Register the analyzer menu on
index. - text_
tokenizer - The tokenizer name of the analyzed text field.