Skip to main content

Module term_dict

Module term_dict 

Source
Expand description

FST-based term dictionary with automaton search.

Maps terms (strings) to posting list offsets using a finite state transducer. Supports O(term_length) exact lookup, prefix iteration, and automaton-based search for wildcard/fuzzy/regex queries.

The FST compresses shared prefixes and suffixes, and enables DFA intersection that prunes entire subtrees of non-matching terms.

See [[inverted-index]], [[optimization-wildcard-fuzzy-queries]], and [[architecture-overview#Step 2]].

Structs§

TermDict
Read-only term dictionary backed by an FST.
TermDictBuilder
Builds a term dictionary. Terms must be added in lexicographic order.