New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for geo distance query #8
Comments
Hey guys, I need some input with this issue. I am getting {
"query": {
"bool": {
"filter": [
{
"geo_distance": {
"distance": "200km",
"pin.location": {
"lat": "40",
"lon": "-70"
}
}
}
]
}
}
} I had to list Can you suggest a solution to this? |
What is the datatype of location field? it should be |
Yeah about that, do you mean: Specifying |
No no Pin.location should have geo_point datatype of es mapping. You should add Where geo_point is datatype and geo_distance is query name. |
Yes, I've already done that, but it seems ES is not able to determine the type of the field. It is |
Then you need to pick a new field and add geo_point mapping for that. |
@metagrover ES field type needs to be defined (via mappings), Elasticsearch can't auto-infer it as geo-point. Since mappings are also immutable starting v2.0, you should define it for a new field. https://www.elastic.co/guide/en/elasticsearch/reference/current/geo-point.html |
Merged in f10cae3. |
Implement support for Geo Distance Query.
Prerequisites
Code Structure
The code structure will resemble the files in this path - https://github.com/appbaseio/mirage/tree/dev/app/build/singlequery/queries.
There should be two files created:
geodistance.query.ts
andgeodistance.query.spec.ts
.Before PR
The text was updated successfully, but these errors were encountered: