Enum tantivy::query::QueryParserError[][src]

pub enum QueryParserError {
Show 13 variants SyntaxError, FieldDoesNotExist(String), ExpectedInt(ParseIntError), ExpectedBase64(DecodeError), ExpectedFloat(ParseFloatError), AllButQueryForbidden, NoDefaultFieldDeclared, FieldNotIndexed(String), FieldDoesNotHavePositionsIndexed(String), UnknownTokenizer(String, String), RangeMustNotHavePhrase, DateFormatError(ParseError), FacetFormatError(FacetParseError),
}
Expand description

Possible error that may happen when parsing a query.

Variants

SyntaxError

Error in the query syntax

FieldDoesNotExist

FieldDoesNotExist(field_name: String) The query references a field that is not in the schema

Tuple Fields of FieldDoesNotExist

0: String
ExpectedInt

The query contains a term for a u64 or i64-field, but the value is neither.

Tuple Fields of ExpectedInt

0: ParseIntError
ExpectedBase64

The query contains a term for a bytes field, but the value is not valid base64.

Tuple Fields of ExpectedBase64

0: DecodeError
ExpectedFloat

The query contains a term for a f64-field, but the value is not a f64.

Tuple Fields of ExpectedFloat

0: ParseFloatError
AllButQueryForbidden

It is forbidden queries that are only “excluding”. (e.g. -title:pop)

NoDefaultFieldDeclared

If no default field is declared, running a query without any field specified is forbbidden.

FieldNotIndexed

The field searched for is not declared as indexed in the schema.

Tuple Fields of FieldNotIndexed

0: String
FieldDoesNotHavePositionsIndexed

A phrase query was requested for a field that does not have any positions indexed.

Tuple Fields of FieldDoesNotHavePositionsIndexed

0: String
UnknownTokenizer

The tokenizer for the given field is unknown The two argument strings are the name of the field, the name of the tokenizer

Tuple Fields of UnknownTokenizer

0: String1: String
RangeMustNotHavePhrase

The query contains a range query with a phrase as one of the bounds. Only terms can be used as bounds.

DateFormatError

The format for the date field is not RFC 3339 compliant.

Tuple Fields of DateFormatError

0: ParseError
FacetFormatError

The format for the facet field is invalid.

Tuple Fields of FacetFormatError

0: FacetParseError

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.