pub fn parse_query(query: &str) -> Result<ParsedQuery, InvalidQuery>Expand description
Parse an FTS query string into positive and negative term lists.
Recognises:
NOT <term>— the wordNOT(case-sensitive) followed by a whitespace- separated term marks that term as negative.-<term>— a term prefixed with-(no space) marks it as negative.- Everything else is a positive term.
Returns Err(InvalidQuery::ParenthesesNotSupported) if a ( is found after
NOT. Returns Err(InvalidQuery::NegativeOnly) if there are no positive
terms after parsing.