My search:
{
"filter": {
"geo_bounding_box": {
"location": {
"top_left": {
"lat": 90,
"lon": -180
},
"bottom_right": {
"lat": -90,
"lon": 180
}
}
}
}
}
It returns no results.
If I change a value, it works.
Haha! So basically you don't want to filter anything, right?
I guess we should in that case detect that and don't apply the filter at all.
@chilling WDYT?
Yes, I don't want to filter anything.
But I expect to get results.
If I use 90/-180 & -90/179.9999 , it works.
same problem, it works if I have longitude 179.9999 or -179.9999
Validation of geo-points is turning this filter into:
GeoBoundingBoxFilter(loc, [90.0, 180.0], [-90.0, 180.0])
This probably isn't the right thing to do in this case, but using a geo-filter in this way is really bad for performance. You don't want to use this as a "match-all" query
@colings86 what do you think?
A workaround for this bug is to set the normalize flag to false, making the original request in this issue:
{
"filter": {
"geo_bounding_box": {
"normalize": false,
"location": {
"top_left": {
"lat": 90,
"lon": -180
},
"bottom_right": {
"lat": -90,
"lon": 180
}
}
}
}
}
This will stop the -180 being converted to +180 but will require the calling code to ensure the top and bottom are within [-90, 90] and the left and right are within [-180,180]
Thanks! :)