I'm trying to switch from RestHighLevelClient to Elasticsearch Java API Client in my Java application, and now it causes some problems with indexing geo_point fields. Specifically, I get.
{
"index":{
"_id":"id",
"_index":"multiple_fields_entity",
"status":400,
"error":{
"type":"mapper_parsing_exception",
"reason":"failed to parse field [coordinates] of type [geo_point]",
"caused_by":{
"type":"parse_exception",
"reason":"field must be either [lat], [lon] or [geohash]"
}
},
"_type":"_doc"
}
}
The version of Elasticsearch stayed the same, 7.17.11. The mapping of the multiple_fields_entity field is as follows.
When I send the document object in an index request, the coordinates field is of class org.elasticsearch.common.geo.GeoPoint. With the RestHighLevelClient everything worked fine; the error occurred after the client switch. Could you please help me to make it work? Thanks.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.