diff --git a/milli/src/search/facet/filter.rs b/milli/src/search/facet/filter.rs index a4ac53950..c660a3858 100644 --- a/milli/src/search/facet/filter.rs +++ b/milli/src/search/facet/filter.rs @@ -54,8 +54,6 @@ impl Display for BadGeoError { enum FilterError<'a> { AttributeNotFilterable { attribute: &'a str, filterable_fields: HashSet }, ParseGeoError(BadGeoError), - ReservedGeo(&'a str), - Reserved(&'a str), TooDeep, } impl<'a> std::error::Error for FilterError<'a> {} @@ -96,12 +94,6 @@ impl<'a> Display for FilterError<'a> { "Too many filter conditions, can't process more than {} filters.", MAX_FILTER_DEPTH ), - Self::ReservedGeo(keyword) => write!(f, "`{}` is a reserved keyword and thus can't be used as a filter expression. Use the `_geoRadius(latitude, longitude, distance)` or `_geoBoundingBox([latitude, longitude], [latitude, longitude])` built-in rules to filter on `_geo` field coordinates.", keyword), - Self::Reserved(keyword) => write!( - f, - "`{}` is a reserved keyword and thus can't be used as a filter expression.", - keyword - ), Self::ParseGeoError(error) => write!(f, "{}", error), } } @@ -333,15 +325,6 @@ impl<'a> Filter<'a> { } } else { match fid.value() { - attribute @ "_geo" => { - Err(fid.as_external_error(FilterError::ReservedGeo(attribute)))? - } - attribute if attribute.starts_with("_geoPoint(") => { - Err(fid.as_external_error(FilterError::ReservedGeo("_geoPoint")))? - } - attribute @ "_geoDistance" => { - Err(fid.as_external_error(FilterError::Reserved(attribute)))? - } attribute => { Err(fid.as_external_error(FilterError::AttributeNotFilterable { attribute,