Expand description
Partition-side text index engine for the Waratah text plugin.
One Tantivy directory per O partition, holding one document per distinct string-literal term. Two search structures live in that document:
- the analyzed
textfield, for Jena-styletext:querytoken search; - the bounded
text_begin/text_endfields, for exact prefix and suffix candidate queries.text_endstores the lastseed_charscharacters reversed, so a suffix query is a prefix query and the FST term dictionary can seek it instead of walking the whole vocabulary.
This crate deliberately has no dependency on waratah_compute: the O
partition and the offline CLI use it directly, while the compute-side plugin
depends on it for schema and document construction. Terms are opaque bytes
here — encoding and registry resolution belong to the callers.
The index is derived data. It is never retracted on delete, it is rebuilt
from the hexastore when lost, and it is only trusted once a build has
stamped an epoch into meta::TextIndexMeta.
Re-exports§
pub use error::TextIndexError;pub use index::TextIndex;pub use index::TextIndexOptions;pub use meta::SKETCH_FILE;pub use meta::TextIndexMeta;pub use query::build_query;
Modules§
- doc
- Tantivy document assembly and the bounded seeds derived from a lexical form.
- error
- Errors of the partition-side text index engine.
- index
- The partition-side text index: one Tantivy directory per O partition.
- meta
- Index sidecar metadata: the trust state and the configuration that lives beside the Tantivy directory.
- query
- Candidate queries for the three search modes.
- schema
- Tantivy schema for the text index.
- scratch
- Compute-side evaluation of a text request over in-house terms.
Structs§
- Text
Index Doc - One literal to add to the text index.
- Text
Search Request - One candidate drain request.
Enums§
- Text
Candidate Mode - Which candidate query to run against a text index.
Constants§
- ANALYZERS
- Analyzer menu: config value → tokenizer name registered on the index.
- DEFAULT_
ANALYZER - Default analyzer name: tokenize, drop over-long tokens, lowercase.
- DEFAULT_
SEED_ CHARS - Default number of characters stored in the bounded prefix and suffix fields.
- LANG_
NONE - Language-field sentinel for a literal without a language tag.
- MAX_
SEED_ CHARS - Largest accepted seed length.
- RAW_
TOKENIZER - Tokenizer name used by the bounded seed fields and the language field.
Functions§
- registered_
analyzer - The registered tokenizer name for a configuration analyzer value.