pub enum QueryParserError {
Show 19 variants Syntax(String), UnsupportedQuery(String), FieldDoesNotExist(String), ExpectedInt(ParseIntError), ExpectedBase64(DecodeError), ExpectedFloat(ParseFloatError), ExpectedBool(ParseBoolError), AllButQueryForbidden, NoDefaultFieldDeclared, FieldNotIndexed(String), JsonFieldWithoutPath(String), NonJsonFieldWithPath(String), FieldDoesNotHavePositionsIndexed(String), UnknownTokenizer { tokenizer: String, field: String, }, RangeMustNotHavePhrase, DateFormat(Parse), FacetFormat(FacetParseError), IpFormat(AddrParseError), Pest(Box<Error<Rule>>),
}
Expand description

Possible error that may happen when parsing a query.

Variants§

§

Syntax(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.

§

JsonFieldWithoutPath(String)

The field is declated as JSON but the query does not contain object path

§

NonJsonFieldWithPath(String)

The field is not declated as JSON but the query does contain object path

§

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.

§

DateFormat(Parse)

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

§

FacetFormat(FacetParseError)

The format for the facet field is invalid.

§

IpFormat(AddrParseError)

The format for the ip field is invalid.

§

Pest(Box<Error<Rule>>)

Pest parser failed to parse string

Trait Implementations§

source§

impl Debug for QueryParserError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for QueryParserError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for QueryParserError

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

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

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<AddrParseError> for QueryParserError

source§

fn from(source: AddrParseError) -> Self

Converts to this type from the input type.
source§

impl From<Box<Error<Rule>>> for QueryParserError

source§

fn from(source: Box<Error<Rule>>) -> Self

Converts to this type from the input type.
source§

impl From<DecodeError> for QueryParserError

source§

fn from(source: DecodeError) -> Self

Converts to this type from the input type.
source§

impl From<FacetParseError> for QueryParserError

source§

fn from(source: FacetParseError) -> Self

Converts to this type from the input type.
source§

impl From<Parse> for QueryParserError

source§

fn from(source: Parse) -> Self

Converts to this type from the input type.
source§

impl From<ParseBoolError> for QueryParserError

source§

fn from(source: ParseBoolError) -> Self

Converts to this type from the input type.
source§

impl From<ParseFloatError> for QueryParserError

source§

fn from(source: ParseFloatError) -> Self

Converts to this type from the input type.
source§

impl From<ParseIntError> for QueryParserError

source§

fn from(source: ParseIntError) -> Self

Converts to this type from the input type.
source§

impl PartialEq for QueryParserError

source§

fn eq(&self, other: &QueryParserError) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for QueryParserError

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> Downcast for T
where T: Any,

source§

fn into_any(self: Box<T>) -> Box<dyn Any>

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.
source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

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

fn as_any(&self) -> &(dyn Any + 'static)

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

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

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

impl<T> DowncastSync for T
where T: Any + Send + Sync,

source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

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

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

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

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> Fruit for T
where T: Send + Downcast,