You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey guys, we have run into what seems to be a bug when using the Java API Client, specifically the indices().getSettings() API. This is the stack trace:
co.elastic.clients.transport.TransportException: node: http://localhost:9201/, status: 200, [es/indices.get_settings] Failed to decode response
at co.elastic.clients.transport.ElasticsearchTransportBase.decodeTransportResponse(ElasticsearchTransportBase.java:404)
at co.elastic.clients.transport.ElasticsearchTransportBase.getApiResponse(ElasticsearchTransportBase.java:363)
at co.elastic.clients.transport.ElasticsearchTransportBase.performRequest(ElasticsearchTransportBase.java:147)
at co.elastic.clients.elasticsearch.indices.ElasticsearchIndicesClient.getSettings(ElasticsearchIndicesClient.java:1285)
at co.elastic.clients.elasticsearch.indices.ElasticsearchIndicesClient.getSettings(ElasticsearchIndicesClient.java:1303)
...
Caused by: co.elastic.clients.json.JsonpMappingException: Error deserializing co.elastic.clients.elasticsearch._types.analysis.TokenizerDefinition: co.elastic.clients.util.MissingRequiredPropertyException: Missing required property 'NGramTokenizer.tokenChars' (JSON path: lia_dev_en_24_11.settings.index.analysis.tokenizer.loginNGram) (line no=1, column no=2255, offset=-1)
at co.elastic.clients.json.JsonpMappingException.from0(JsonpMappingException.java:134)
at co.elastic.clients.json.JsonpMappingException.from(JsonpMappingException.java:121)
at co.elastic.clients.json.ObjectDeserializer.deserializeInner(ObjectDeserializer.java:236)
at co.elastic.clients.json.ObjectDeserializer.deserialize(ObjectDeserializer.java:166)
at co.elastic.clients.json.ObjectDeserializer.deserialize(ObjectDeserializer.java:157)
at co.elastic.clients.json.BuildFunctionDeserializer.deserialize(BuildFunctionDeserializer.java:53)
at co.elastic.clients.json.DelegatingDeserializer$SameType.deserialize(DelegatingDeserializer.java:48)
at co.elastic.clients.json.UnionDeserializer$SingleMemberHandler.deserialize(UnionDeserializer.java:74)
at co.elastic.clients.json.UnionDeserializer.deserialize(UnionDeserializer.java:287)
at co.elastic.clients.json.UnionDeserializer.deserialize(UnionDeserializer.java:258)
at co.elastic.clients.json.DelegatingDeserializer$SameType.deserialize(DelegatingDeserializer.java:43)
at co.elastic.clients.json.JsonpDeserializerBase$StringMapDeserializer.deserialize(JsonpDeserializerBase.java:349)
at co.elastic.clients.json.JsonpDeserializerBase$StringMapDeserializer.deserialize(JsonpDeserializerBase.java:333)
at co.elastic.clients.json.JsonpDeserializer.deserialize(JsonpDeserializer.java:77)
at co.elastic.clients.json.ObjectDeserializer$FieldObjectDeserializer.deserialize(ObjectDeserializer.java:78)
at co.elastic.clients.json.ObjectDeserializer.deserializeInner(ObjectDeserializer.java:214)
at co.elastic.clients.json.ObjectDeserializer.deserialize(ObjectDeserializer.java:166)
at co.elastic.clients.json.ObjectDeserializer.deserialize(ObjectDeserializer.java:157)
at co.elastic.clients.json.JsonpDeserializer.deserialize(JsonpDeserializer.java:77)
at co.elastic.clients.json.ObjectBuilderDeserializer.deserialize(ObjectBuilderDeserializer.java:79)
at co.elastic.clients.json.DelegatingDeserializer$SameType.deserialize(DelegatingDeserializer.java:43)
at co.elastic.clients.json.ObjectDeserializer$FieldObjectDeserializer.deserialize(ObjectDeserializer.java:78)
at co.elastic.clients.json.ObjectDeserializer.deserializeInner(ObjectDeserializer.java:214)
at co.elastic.clients.json.ObjectDeserializer.deserialize(ObjectDeserializer.java:166)
at co.elastic.clients.json.ObjectDeserializer.deserialize(ObjectDeserializer.java:157)
at co.elastic.clients.json.JsonpDeserializer.deserialize(JsonpDeserializer.java:77)
at co.elastic.clients.json.ObjectBuilderDeserializer.deserialize(ObjectBuilderDeserializer.java:79)
at co.elastic.clients.json.DelegatingDeserializer$SameType.deserialize(DelegatingDeserializer.java:43)
at co.elastic.clients.json.ObjectDeserializer$FieldObjectDeserializer.deserialize(ObjectDeserializer.java:78)
at co.elastic.clients.json.ObjectDeserializer.deserializeInner(ObjectDeserializer.java:214)
at co.elastic.clients.json.ObjectDeserializer.deserialize(ObjectDeserializer.java:166)
at co.elastic.clients.json.ObjectDeserializer.deserialize(ObjectDeserializer.java:157)
at co.elastic.clients.json.JsonpDeserializer.deserialize(JsonpDeserializer.java:77)
at co.elastic.clients.json.ObjectBuilderDeserializer.deserialize(ObjectBuilderDeserializer.java:79)
at co.elastic.clients.json.DelegatingDeserializer$SameType.deserialize(DelegatingDeserializer.java:43)
at co.elastic.clients.json.ObjectDeserializer$FieldObjectDeserializer.deserialize(ObjectDeserializer.java:78)
at co.elastic.clients.json.ObjectDeserializer.deserializeInner(ObjectDeserializer.java:214)
at co.elastic.clients.json.ObjectDeserializer.deserialize(ObjectDeserializer.java:166)
at co.elastic.clients.json.ObjectDeserializer.deserialize(ObjectDeserializer.java:157)
at co.elastic.clients.json.JsonpDeserializer.deserialize(JsonpDeserializer.java:77)
at co.elastic.clients.json.ObjectBuilderDeserializer.deserialize(ObjectBuilderDeserializer.java:79)
at co.elastic.clients.json.DelegatingDeserializer$SameType.deserialize(DelegatingDeserializer.java:43)
at co.elastic.clients.json.JsonpDeserializerBase$StringMapDeserializer.deserialize(JsonpDeserializerBase.java:349)
at co.elastic.clients.json.JsonpDeserializerBase$StringMapDeserializer.deserialize(JsonpDeserializerBase.java:333)
at co.elastic.clients.elasticsearch.indices.GetIndicesSettingsResponse.lambda$createGetIndicesSettingsResponseDeserializer$0(GetIndicesSettingsResponse.java:186)
at co.elastic.clients.json.JsonpDeserializer$3.deserialize(JsonpDeserializer.java:136)
at co.elastic.clients.json.JsonpDeserializer.deserialize(JsonpDeserializer.java:77)
at co.elastic.clients.transport.ElasticsearchTransportBase.decodeTransportResponse(ElasticsearchTransportBase.java:399)
... 104 more
Caused by: co.elastic.clients.util.MissingRequiredPropertyException: Missing required property 'NGramTokenizer.tokenChars'
at co.elastic.clients.util.ApiTypeHelper.requireNonNull(ApiTypeHelper.java:76)
at co.elastic.clients.util.ApiTypeHelper.unmodifiableRequired(ApiTypeHelper.java:141)
at co.elastic.clients.elasticsearch._types.analysis.NGramTokenizer.<init>(NGramTokenizer.java:79)
at co.elastic.clients.elasticsearch._types.analysis.NGramTokenizer.<init>(NGramTokenizer.java:61)
at co.elastic.clients.elasticsearch._types.analysis.NGramTokenizer$Builder.build(NGramTokenizer.java:227)
at co.elastic.clients.elasticsearch._types.analysis.NGramTokenizer$Builder.build(NGramTokenizer.java:157)
at co.elastic.clients.json.ObjectBuilderDeserializer.deserialize(ObjectBuilderDeserializer.java:80)
at co.elastic.clients.json.DelegatingDeserializer$SameType.deserialize(DelegatingDeserializer.java:43)
at co.elastic.clients.json.ObjectDeserializer$FieldObjectDeserializer.deserialize(ObjectDeserializer.java:78)
at co.elastic.clients.json.ObjectDeserializer.deserializeInner(ObjectDeserializer.java:231)
... 149 more
Hello! This was already fixed, but it looks like we forgot to backport it to 8.15.3, sorry for that. You'll find the fix in the new version 8.16, set to release soon, or in the next 8.15 patch
Java API client version
8.15.3
Java version
8
Elasticsearch Version
8.4.3
Problem description
Hey guys, we have run into what seems to be a bug when using the Java API Client, specifically the
indices().getSettings()
API. This is the stack trace:This is the object that fails to be deserialized:
It seems that logic is expecting for this object to have the
token_chars
attribute. But according to the documentation, that attribute should default to an empty array.I tried setting
ApiTypeHelper.DANGEROUS_disableRequiredPropertiesCheck
as a workaround, but a different exception is thrown in that case.The text was updated successfully, but these errors were encountered: