-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
:Analytics/GeoIndexing, search aggregations of geo points and shapesIndexing, search aggregations of geo points and shapes>bug
Description
Good day, trying to integrate twitter location data in WKT format, run into following issue:
System
version:
{
"name": "3w66Vhm",
"cluster_name": "docker-cluster",
"cluster_uuid": "9dWrPtnVQfWUinPFppNJmA",
"version": {
"number": "6.4.2",
"build_flavor": "default",
"build_type": "tar",
"build_hash": "04711c2",
"build_date": "2018-09-26T13:34:09.098244Z",
"build_snapshot": false,
"lucene_version": "7.4.0",
"minimum_wire_compatibility_version": "5.6.0",
"minimum_index_compatibility_version": "5.0.0"
},
"tagline": "You Know, for Search"
}
jvm: 1.8
plugins: raw docker img from https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html
Description of the problem including expected versus actual behavior:
Different validation rules for WKT vs own format
Steps to reproduce:
- Mapping for example with weak requirements (for twitter) from Update ShapeBuilder and GeoPolygonQueryParser to accept non-closed GeoJSON #11161
PUT /example
{
"mappings": {
"doc": {
"properties": {
"location": {
"type": "geo_shape",
"tree": "quadtree",
"precision": "100m",
"coerce": true
}
}
}
}
}
- Coordinates with usual type works perfectly
POST /example/doc
{
"location" : {
"type" : "polygon",
"coordinates" : [
[ [114.200488, -8.413208], [114.200488, -8.348076], [114.317869, -8.348076], [114.317869, -8.413208] ]
]
}
}
- WKT-format procuses error
POST /example/doc
{
"location" : "Polygon((114.200488 -8.413208, 114.200488 -8.348076, 114.317869 -8.348076, 114.317869 -8.413208))"
}
Output:
{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "failed to parse [location]"
}
],
"type": "mapper_parsing_exception",
"reason": "failed to parse [location]",
"caused_by": {
"type": "illegal_argument_exception",
"reason": "invalid LinearRing found (coordinates are not closed)"
}
},
"status": 400
}
nknize
Metadata
Metadata
Assignees
Labels
:Analytics/GeoIndexing, search aggregations of geo points and shapesIndexing, search aggregations of geo points and shapes>bug