Hi
I have been getting the following elasticsearch exception when i try to update a geo_shape field from circle to polygon using java high level rest client. Can someone please help?
{"error":{"root_cause":[{"type":"parse_exception","reason":"field [radius] is supported for [CIRCLE] only"}],"type":"mapper_parsing_exception","reason":"failed to parse [geometry]","caused_by":{"type":"parse_exception","reason":"field [radius] is supported for [CIRCLE] only"}},"status":400}
at org.elasticsearch.client.RestClient$1.completed(RestClient.java:357) ~[elasticsearch-rest-client-6.1.2.jar:6.1.2]
at org.elasticsearch.client.RestClient$1.completed(RestClient.java:346) ~[elasticsearch-rest-client-6.1.2.jar:6.1.2]
at org.apache.http.concurrent.BasicFuture.completed(BasicFuture.java:122) ~[httpcore-4.4.11.jar:4.4.11]
at org.apache.http.impl.nio.client.DefaultClientExchangeHandlerImpl.responseCompleted(DefaultClientExchangeHandlerImpl.java:181) ~[httpasyncclient-4.1.4.jar:4.1.4]
at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.processResponse(HttpAsyncRequestExecutor.java:448) ~[httpcore-nio-4.4.11.jar:4.4.11]
at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.inputReady(HttpAsyncRequestExecutor.java:338) ~[httpcore-nio-4.4.11.jar:4.4.11]
at org.apache.http.impl.nio.DefaultNHttpClientConnection.consumeInput(DefaultNHttpClientConnection.java:265) ~[httpcore-nio-4.4.11.jar:4.4.11]
at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:81) ~[httpasyncclient-4.1.4.jar:4.1.4]
at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:39) ~[httpasyncclient-4.1.4.jar:4.1.4]
at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:114) ~[httpcore-nio-4.4.11.jar:4.4.11]
at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:162) ~[httpcore-nio-4.4.11.jar:4.4.11]
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:337) ~[httpcore-nio-4.4.11.jar:4.4.11]
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:315) ~[httpcore-nio-4.4.11.jar:4.4.11]
at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:276) ~[httpcore-nio-4.4.11.jar:4.4.11]
at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:104) ~[httpcore-nio-4.4.11.jar:4.4.11]
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:591) ~[httpcore-nio-4.4.11.jar:4.4.11]
... 1 common frames omitted
Caused by: org.elasticsearch.ElasticsearchException: Elasticsearch exception [type=parse_exception, reason=field [radius] is supported for [CIRCLE] only]
at org.elasticsearch.ElasticsearchException.innerFromXContent(ElasticsearchException.java:490) ~[elasticsearch-6.1.2.jar:6.1.2]
at org.elasticsearch.ElasticsearchException.fromXContent(ElasticsearchException.java:406) ~[elasticsearch-6.1.2.jar:6.1.2]
at org.elasticsearch.ElasticsearchException.innerFromXContent(ElasticsearchException.java:435) ~[elasticsearch-6.1.2.jar:6.1.2]
at org.elasticsearch.ElasticsearchException.failureFromXContent(ElasticsearchException.java:594) ~[elasticsearch-6.1.2.jar:6.1.2]
at org.elasticsearch.rest.BytesRestResponse.errorFromXContent(BytesRestResponse.java:169) ~[elasticsearch-6.1.2.jar:6.1.2]
... 112 common frames omitted
Here's my mapping
{
"bigpolygons": {
"mappings": {
"bigpolygon": {
"properties": {
"geometry": {
"type": "geo_shape"
},
"id": {
"type": "keyword"
},
"type": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
}
}
Elasticsearch version - 6.1.2
Java high level rest client version - 6.1.2
Java version - 12