Expand description
Inverted index over TensorLogic terms for fast predicate/constant/variable lookup.
TermIndexBuilder maintains a posting-list index keyed by TermType.
Each posting list is a Vec<TermRef> that records which rule (or fact) and
at which position a given term appears. The index supports incremental
construction (index_term), point lookups (lookup, lookup_predicate,
lookup_constant), derived queries (rules_for_predicate), mutation
(remove_rule, clear), and statistics (stats).
Structs§
- Index
Stats - Summary statistics for a
TermIndexBuilder. - Term
Index Builder - Builds and queries an inverted index over TensorLogic terms.
- TermRef
- A single posting-list entry: records which rule (or fact) mentions a term and at which position.
Enums§
- Term
Position - Describes where in a rule (or as a standalone fact) a term appears.
- Term
Type - The kind/value of a term used as an index key.