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§
- Rebuild
Report - Totals of one rebuild pass.
- Text
Executor Plugin - Execution hook for
text_scan. - Text
Planner Plugin - Text plugin planner hook, parameterized by the plugin config (the fingerprint rides every rewrite decision).
- Text
Plugin Config - Plugin configuration.
- Text
Scan Payload - Payload of one
text_scanop. - Text
Subjects Payload - Payload of one
text_subjectsop. - Text
Write Plugin - 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:queryIRI (Jena Text index vocabulary).- TEXT_
SCAN_ OP_ ID text_scanop id on the CustomNode.- TEXT_
SUBJECTS_ OP_ ID text_subjectsop 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 withterms. - 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+ onewaratah_compute::PluginHost::install_process_wideinstead. - 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:querypass-through onhost(the composition point every plugin crate shares; the binary then installs the composed host exactly once, BEFORE anyQueryEngineis constructed). - text_
custom_ functions - The
text:querycustom-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:queryregistration payload: a lowering pass-through.