mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-09-05 20:26:31 +00:00
Small improvements
This commit is contained in:
@ -133,7 +133,7 @@ fn parse_vectors(input: Span) -> IResult<(Token, Option<Token>, VectorFilter<'_>
|
|||||||
let (input, _) = char('.')(input)?;
|
let (input, _) = char('.')(input)?;
|
||||||
|
|
||||||
// From this point, we are certain this is a vector filter, so our errors must be final.
|
// From this point, we are certain this is a vector filter, so our errors must be final.
|
||||||
// We could use nom's `cut`` but it's better to be explicit about the errors
|
// We could use nom's `cut` but it's better to be explicit about the errors
|
||||||
|
|
||||||
let (input, embedder_name) =
|
let (input, embedder_name) =
|
||||||
parse_vector_value(input).map_cut(ErrorKind::VectorFilterInvalidEmbedder)?;
|
parse_vector_value(input).map_cut(ErrorKind::VectorFilterInvalidEmbedder)?;
|
||||||
|
@ -78,6 +78,10 @@ pub enum ErrorKind<'a> {
|
|||||||
GeoBoundingBox,
|
GeoBoundingBox,
|
||||||
MisusedGeoRadius,
|
MisusedGeoRadius,
|
||||||
MisusedGeoBoundingBox,
|
MisusedGeoBoundingBox,
|
||||||
|
VectorFilterLeftover,
|
||||||
|
VectorFilterInvalidEmbedder,
|
||||||
|
VectorFilterMissingFragment,
|
||||||
|
VectorFilterInvalidFragment,
|
||||||
InvalidPrimary,
|
InvalidPrimary,
|
||||||
InvalidEscapedNumber,
|
InvalidEscapedNumber,
|
||||||
ExpectedEof,
|
ExpectedEof,
|
||||||
@ -93,11 +97,6 @@ pub enum ErrorKind<'a> {
|
|||||||
InternalError(error::ErrorKind),
|
InternalError(error::ErrorKind),
|
||||||
DepthLimitReached,
|
DepthLimitReached,
|
||||||
External(String),
|
External(String),
|
||||||
|
|
||||||
VectorFilterLeftover,
|
|
||||||
VectorFilterInvalidEmbedder,
|
|
||||||
VectorFilterMissingFragment,
|
|
||||||
VectorFilterInvalidFragment,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Error<'a> {
|
impl<'a> Error<'a> {
|
||||||
|
Reference in New Issue
Block a user