pub enum QueryParserError {
Show 17 variants
SyntaxError(String),
UnsupportedQuery(String),
FieldDoesNotExist(String),
ExpectedInt(ParseIntError),
ExpectedBase64(DecodeError),
ExpectedFloat(ParseFloatError),
ExpectedBool(ParseBoolError),
AllButQueryForbidden,
NoDefaultFieldDeclared,
FieldNotIndexed(String),
FieldDoesNotHavePositionsIndexed(String),
PhrasePrefixRequiresAtLeastTwoTerms {
phrase: String,
tokenizer: 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 forbidden.
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.
PhrasePrefixRequiresAtLeastTwoTerms
A phrase-prefix query requires at least two terms
Fields
UnknownTokenizer
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§
Source§impl Debug for QueryParserError
impl Debug for QueryParserError
Source§impl Display for QueryParserError
impl Display for QueryParserError
impl Eq for QueryParserError
Source§impl Error for QueryParserError
impl Error for QueryParserError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<AddrParseError> for QueryParserError
impl From<AddrParseError> for QueryParserError
Source§fn from(source: AddrParseError) -> Self
fn from(source: AddrParseError) -> Self
Source§impl From<DecodeError> for QueryParserError
impl From<DecodeError> for QueryParserError
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Source§impl From<FacetParseError> for QueryParserError
impl From<FacetParseError> for QueryParserError
Source§fn from(source: FacetParseError) -> Self
fn from(source: FacetParseError) -> Self
Source§impl From<Parse> for QueryParserError
impl From<Parse> for QueryParserError
Source§impl From<ParseBoolError> for QueryParserError
impl From<ParseBoolError> for QueryParserError
Source§fn from(source: ParseBoolError) -> Self
fn from(source: ParseBoolError) -> Self
Source§impl From<ParseFloatError> for QueryParserError
impl From<ParseFloatError> for QueryParserError
Source§fn from(source: ParseFloatError) -> Self
fn from(source: ParseFloatError) -> Self
Source§impl From<ParseIntError> for QueryParserError
impl From<ParseIntError> for QueryParserError
Source§fn from(source: ParseIntError) -> Self
fn from(source: ParseIntError) -> Self
Source§impl From<QueryParserError> for TantivyError
impl From<QueryParserError> for TantivyError
Source§fn from(parsing_error: QueryParserError) -> TantivyError
fn from(parsing_error: QueryParserError) -> TantivyError
Source§impl PartialEq for QueryParserError
impl PartialEq for QueryParserError
Source§fn eq(&self, other: &QueryParserError) -> bool
fn eq(&self, other: &QueryParserError) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for QueryParserError
Auto Trait Implementations§
impl Freeze for QueryParserError
impl RefUnwindSafe for QueryParserError
impl Send for QueryParserError
impl Sync for QueryParserError
impl Unpin for QueryParserError
impl UnsafeUnpin for QueryParserError
impl UnwindSafe for QueryParserError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&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)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&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> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<T> Fruit for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more