elasticsearch-java icon indicating copy to clipboard operation
elasticsearch-java copied to clipboard

Problem with GeoPointProperty - unknown field 'index'

Open MaxWenzel opened this issue 2 years ago • 1 comments

Java API client version

8.3.3

Java version

17.0.3

Elasticsearch Version

8.3.3

Problem description

Hi, according the Documentation I can use the parameter index for the field-type geo_point. I use the Java-Client in Version 8.3.3 and a mapping like this (only a snippet):

"location": { "index": false, "type": "geo_point" }

But the result is the following exception:

co.elastic.clients.json.JsonpMappingException: Error deserializing co.elastic.clients.elasticsearch._types.mapping.GeoPointProperty: Unknown field 'index'

However, when I look at the class GeoPointProperty, I don't see an index field either (I looked also in the source-code). It seems to me that this field has been forgotten.

MaxWenzel avatar Sep 06 '22 16:09 MaxWenzel

Same issue here with version of client 7.17.2 and server 7.17.2. I'm only migrating my java client from rest hight level to the new java client and get plenty of errors like this one...

grib0 avatar Oct 10 '22 13:10 grib0

Same issue with client 7.17.16 sadly

BDelacour avatar May 15 '23 07:05 BDelacour

I ran into the same issue that the GeoPointProperty is not according to the spec. Already a PR is filed since months... Is there any update on that topic? It would be great to get such small issues sorted out to make the migration from high level rest client easier.

f-loris avatar Nov 20 '23 09:11 f-loris

Hello :) thanks for the report and sorry for the long wait. This is indeed an issue with the API specification definition missing some fields for GeoPoint. This will be fixed soon in the api-spec and then the java client will be updated to solve this issue.

l-trotta avatar Feb 22 '24 16:02 l-trotta