package granary
Module Granary_sql.Fts_querySource
FTS query string parser.
Parses a MATCH query string into a structured query tree.
Syntax:
- Space-separated terms → implicit AND
term OR term→ OR-termorNOT term→ NOT (negation — must be combined with a positive term)"term1 term2"→ phrase (terms must appear consecutively in same column)term*→ prefix search
All terms are lowercased before matching.
Parse a raw MATCH query string. Returns Error msg on malformed input.
Collect all positive (non-negated) terms from a query, for posting-list lookups.
Pretty-print a query tree in a parenthesised AND/OR/NOT form.