pub enum QueryParserError {
Show 16 variants SyntaxError(String), UnsupportedQuery(String), FieldDoesNotExist(String), ExpectedInt(ParseIntError), ExpectedBase64(DecodeError), ExpectedFloat(ParseFloatError), ExpectedBool(ParseBoolError), AllButQueryForbidden, NoDefaultFieldDeclared, FieldNotIndexed(String), FieldDoesNotHavePositionsIndexed(String), UnknownTokenizer { tokenizer: String, field: String, }, RangeMustNotHavePhrase, DateFormatError(Parse), FacetFormatError(FacetParseError), IpFormatError(AddrParseError),
}
Expand description

Possible error that may happen when parsing a query.

Variants

SyntaxError(String)

Error in the query syntax

UnsupportedQuery(String)

This query is unsupported.

FieldDoesNotExist(String)

The query references a field that is not in the schema

ExpectedInt(ParseIntError)

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

ExpectedBase64(DecodeError)

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

ExpectedFloat(ParseFloatError)

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

ExpectedBool(ParseBoolError)

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

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(String)

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

FieldDoesNotHavePositionsIndexed(String)

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

UnknownTokenizer

Fields

tokenizer: String

The name of the tokenizer

field: String

The field name

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

RangeMustNotHavePhrase

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

DateFormatError(Parse)

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

FacetFormatError(FacetParseError)

The format for the facet field is invalid.

IpFormatError(AddrParseError)

The format for the ip field is invalid.

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
👎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
🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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
🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to provide by using demand. 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.