我正在尝试使用地理距离过滤器运行弹性搜索查询。我的查询工作如下:
{
"filter":
{
"geo_distance": {
"center_point": { "lon": 77.2909989, "lat": 28.6854955 },
"distance": "100m",
"order": "asc"
}
}
}
但是,如果我改变了" geo_distance"中键的顺序。距离首先是json对象,然后是center_points。查询失败。
{
"filter":
{
"geo_distance": {
"distance": "100m",
"order": "asc",
"center_point": { "lon": 77.2909989, "lat": 28.6854955 }
}
}
}
查询失败,错误 -
[geo_distance]
的非法纬度值[251.71875]
我认为按键的顺序不应该有任何影响。 怎么解决这个问题?