Elasticsearch version:
5.5.0
I have tried searching for a coordinate in a neighbouring geohash but it doesnt seem to return the result.
I have added a precision value in the neighbours parameter as well.
This is my search:
POST healthera/pharmacies/_search
{
"suggest": {
"pharmacy-suggest" : {
"prefix" : "Supr",
"completion" : {
"field" : "suggest",
"contexts": {
"location": [
{
"lat": 52.203466,
"lon": 0.13176090,
"precision": 2,
"neighbours": 2
}
]
}
}
}
}
}
This is where the object I am searching for is located:
"name": "Supreme Pharmacy",
"suggest" : {
"input": [ "Supreme", "Pharmacy" ],
"contexts": {
"location": [
{
"lat": 51.490265,
"lon": -0.19761230
}
]
}
}
The object is located in geohash gc and the search is in geohash u1 which is next to gc if the precision is 2.
Neighbours:
gd gf u4
g9 gc u1
g8 gb u0
I cant seem to find the object if it is located in a neighbouring geohash but am able to find it if the search is in the same geohash. Should the neighbours parameter be returning all results from the neighbours of the searched geohash as well? Any help will be appreciated, thanks!