mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-23 18:45:06 +08:00
format
This commit is contained in:
parent
d323e35001
commit
2c65781d91
@ -1,4 +1,3 @@
|
||||
|
||||
use std::fmt::Debug;
|
||||
use std::ops::Bound::{self, Excluded, Included};
|
||||
|
||||
@ -16,9 +15,7 @@ use crate::error::{Error, UserError};
|
||||
use crate::heed_codec::facet::{
|
||||
FacetLevelValueF64Codec, FacetStringLevelZeroCodec, FacetStringLevelZeroValueCodec,
|
||||
};
|
||||
use crate::{
|
||||
distance_between_two_points, CboRoaringBitmapCodec, FieldId, Index, Result,
|
||||
};
|
||||
use crate::{distance_between_two_points, CboRoaringBitmapCodec, FieldId, Index, Result};
|
||||
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub enum FilterCondition {
|
||||
|
@ -215,8 +215,7 @@ impl<'a> ParseContext<'a> {
|
||||
where
|
||||
E: ParseError<&'a str> + ContextError<&'a str> + Debug,
|
||||
{
|
||||
let err_msg_args_incomplete:&'static str =
|
||||
"_geoRadius. The `_geoRadius` filter expect three arguments: `_geoRadius(latitude, longitude, radius)`";
|
||||
let err_msg_args_incomplete:&'static str = "_geoRadius. The `_geoRadius` filter expect three arguments: `_geoRadius(latitude, longitude, radius)`";
|
||||
let err_msg_args_invalid: &'static str =
|
||||
"_geoRadius. Latitude and longitude must be contained between -180 to 180 degrees.";
|
||||
let (input, args): (&str, Vec<&str>) = match preceded(
|
||||
@ -530,7 +529,8 @@ mod tests {
|
||||
&rtxn,
|
||||
&index,
|
||||
"(NOT _geoRadius(1, 2, 300) AND _geoRadius(1.001, 2.002, 1000.300)) OR price <= 10",
|
||||
).unwrap();
|
||||
)
|
||||
.unwrap();
|
||||
let expected = FilterCondition::Or(
|
||||
Box::new(FilterCondition::And(
|
||||
Box::new(FilterCondition::Operator(0, GeoGreaterThan([1., 2.], 300.))),
|
||||
|
Loading…
Reference in New Issue
Block a user