-
Notifications
You must be signed in to change notification settings - Fork 25k
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
geo_polygon does not return any result #35741
Comments
I think the issue is the longitude's in your query are negative, when they should be positive to match the longitudes in the document. E.g. this works for me: GET /wespline/geo_country/_search?pretty
{
"query": {
"bool": {
"must": {
"match_all": {}
},
"filter": {
"geo_polygon": {
"location" : {
"points": [
{"lat": -77, "lon": 39},
{"lat": -77, "lon": 38},
{"lat": -78, "lon": 38},
{"lat": -78, "lon": 39}
]
}
}
}
}
}
} |
Pinging @elastic/es-search-aggs |
Sorry My bad, this example is wrong. An example where this is happening: Document:
Search:
Result:
|
@leobispo I don't really see anything wrong with your example. The southmost point of the polygon in your example has latitude of The geo_point type can be sometimes confusing. For example, when a geo_point is represented as an array, it has |
Ok, I figured out my mistake... It was in the insertion... I was doing [lat,lon] for inserting... instead of [lon,lat]. I will close the Issue! Tnx a lot |
Describe the feature:
Bug on geo_polygon/geo_boundingbox filter
Elasticsearch version (
bin/elasticsearch --version
):5.1.2
JVM version (
java -version
):1.8
OS version (
uname -a
if on a Unix-like system):Linux app 4.15.0-1021-gcp #22~16.04.1-Ubuntu SMP Wed Sep 26 06:08:54 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Description of the problem including expected versus actual behavior:
Should return a document with geo_point, but getting no points
Steps to reproduce:
Mapping
Document:
Query:
Result:
The text was updated successfully, but these errors were encountered: