Skip to main content

Crate waratah_text

Crate waratah_text 

Source
Expand description

Waratah text plugin: Jena-style FILTER text:query plus index-accelerated STRSTARTS / STRENDS / anchored-REGEX candidate injection, backed by a Tantivy index owned by the O partition.

One crate implements the waratah_compute::plugin hooks the other two plugins use — write (TextWritePlugin) and plan/execute (TextPlannerPlugin / TextExecutorPlugin; the text plugin claims no datatypes, string literals are storage-native). Register at compute startup via register: the binary composes every plugin crate onto ONE waratah_compute::PluginHost and installs the composed set exactly once, BEFORE any query is lowered.

v1 boundaries (scope S4): text:query FILTER position only (graph-pattern use is a plan error); CONTAINS and general REGEX are out (no candidate producer without a raw-lexical / n-gram field); score, limit, highlighting, STR(?v) wrappers, and field:term syntax are out. The index is derived data: one Tantivy document per distinct string-literal term, never retracted on delete, rebuilt from the hexastore when lost.

Structs§

RebuildReport
Totals of one rebuild pass.
TextExecutorPlugin
Execution hook for text_scan.
TextPlannerPlugin
Text plugin planner hook, parameterized by the plugin config (the fingerprint rides every rewrite decision).
TextPluginConfig
Plugin configuration.
TextScanPayload
Payload of one text_scan op.
TextSubjectsPayload
Payload of one text_subjects op.
TextWritePlugin
Write-path hook building text-index documents.

Constants§

HEAD_PAGE
Head page for the discovery walk (same shape as the geo driver).
PLUGIN_ID
Stable plugin id carried by every CustomOp the text plugin mints.
TEXT_QUERY_IRI
text:query IRI (Jena Text index vocabulary).
TEXT_SCAN_OP_ID
text_scan op id on the CustomNode.
TEXT_SUBJECTS_OP_ID
text_subjects op id on the CustomNode: the subject form’s resolve node.

Functions§

assemble_batch
Assemble one walked batch of (predicate, literal) documents.
drive_text_rebuild
Drive one full text-index rebuild against hexastore + registry.
group_predicates
Group (object, predicate) domain-scan hits into one predicate list per walked object, aligned with terms.
hashes_of
The registry hashes one string-literal term needs resolved (value and, for the big-language variants, the language tag).
install
Test convenience: install ONLY the text plugin on the process registries with a default-enabled config (first install wins; one guarded host install per process, so repeat calls are no-ops). Production composes every plugin crate via register + one waratah_compute::PluginHost::install_process_wide instead.
install_with
Test convenience with an explicit config (see install).
is_text_term
Whether a walked head term is an indexed string-literal family.
register
Register the text plugin bundle + the text:query pass-through on host (the composition point every plugin crate shares; the binary then installs the composed host exactly once, BEFORE any QueryEngine is constructed).
text_custom_functions
The text:query custom-function entry: a lowering pass-through.
text_head_prefixes
O-axis head prefixes covering every indexed string-literal family: one bare byte each (values and language tags both discoverable, hash-referenced or inline).
text_query_eval_ground
The text:query registration payload: a lowering pass-through.