Skip to main content

parse_query

Function parse_query 

Source
pub fn parse_query(query: &str) -> Vec<QueryTerm>
Expand description

Parse a query string into its QueryTerms. Whitespace separates tokens; /.../ is one regex token. The non-regex modes share the index’s tokenize so a query splits exactly the way the stored terms did: a token that tokenizes to several terms contributes leading Exact terms, and any */~ operator applies to the final term (the typical token is a single term, so this is just Prefix/Fuzzy). Empty/operator-only tokens are dropped.