Struct tantivy::query::QueryParser [] [src]

pub struct QueryParser { /* fields omitted */ }

Tantivy's Query parser

The language covered by the current parser is extremely simple.

Methods

impl QueryParser
[src]

[src]

Creates a QueryParser, given

  • schema - index Schema
  • default_fields - fields used to search if no field is specifically defined in the query.

[src]

Creates a QueryParser, given

  • an index
  • a set of default - fields used to search if no field is specifically defined in the query.

[src]

Set the default way to compose queries to a conjunction.

By default, the query happy tax payer is equivalent to the query happy OR tax OR payer. After calling .set_conjunction_by_default() happy tax payer will be interpreted by the parser as happy AND tax AND payer.

[src]

Parse a query

Note that parse_query returns an error if the input is not a valid query.

There is currently no lenient mode for the query parser which makes it a bad choice for a public/broad user search engine.

Implementing a lenient mode for this query parser is tracked in Issue 5