mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-02-09 03:53:27 +01:00
handle _geo(x,x) sort error
This commit is contained in:
parent
7871d12025
commit
53aa0a1b54
@ -81,6 +81,7 @@ impl FromStr for Member {
|
|||||||
if is_reserved_keyword(text)
|
if is_reserved_keyword(text)
|
||||||
|| text.starts_with("_geoRadius(")
|
|| text.starts_with("_geoRadius(")
|
||||||
|| text.starts_with("_geoBoundingBox(")
|
|| text.starts_with("_geoBoundingBox(")
|
||||||
|
|| text.starts_with("_geo(")
|
||||||
{
|
{
|
||||||
return Err(AscDescError::ReservedKeyword { name: text.to_string() })?;
|
return Err(AscDescError::ReservedKeyword { name: text.to_string() })?;
|
||||||
}
|
}
|
||||||
@ -265,6 +266,8 @@ mod tests {
|
|||||||
("_geoPoint(0, -180.000001):desc", GeoError(BadGeoError::Lng(-180.000001))),
|
("_geoPoint(0, -180.000001):desc", GeoError(BadGeoError::Lng(-180.000001))),
|
||||||
("_geoPoint(159.256, 130):asc", GeoError(BadGeoError::Lat(159.256))),
|
("_geoPoint(159.256, 130):asc", GeoError(BadGeoError::Lat(159.256))),
|
||||||
("_geoPoint(12, -2021):desc", GeoError(BadGeoError::Lng(-2021.))),
|
("_geoPoint(12, -2021):desc", GeoError(BadGeoError::Lng(-2021.))),
|
||||||
|
("_geo(12, -2021):asc", ReservedKeyword { name: S("_geo(12, -2021)") }),
|
||||||
|
("_geo(12, -2021):desc", ReservedKeyword { name: S("_geo(12, -2021)") }),
|
||||||
];
|
];
|
||||||
|
|
||||||
for (req, expected_error) in invalid_req {
|
for (req, expected_error) in invalid_req {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user