Skip to main content

parse

Function parse 

Source
pub fn parse(
    input: &str,
    exact: bool,
    ignore_case: bool,
) -> Result<Query, String>
Expand description

Parse a query string into a structured Query.

Syntax:

  • term → OR term (default)
  • term1 AND term2 → both must match
  • term1 OR term2 → either must match
  • NOT term → must not match
  • term1 AND NOT term2 → term1 required, term2 excluded
  • "exact phrase" → literal phrase match

When exact is false, plain terms use stemming (suffix stripping + prefix match). When exact is true, terms use word-boundary matching.