Skip to content

Error deserializing co.elastic.clients.elasticsearch._types.analysis.Normalizer: Property 'type' not found #696

Closed
@czyzowskibartosz

Description

@czyzowskibartosz

Java API client version

8.10.4

Java version

17

Elasticsearch Version

8.10.2

Problem description

We're migrating to new client. I came across a potential bug while using:
GetIndicesSettingsResponse settings = esClient().indices().getSettings(builder -> builder.index("abc"));
which fails with: Error deserializing co.elastic.clients.elasticsearch._types.analysis.Normalizer: Property 'type' not found

GET abc/_settings returns successfully, and there's one normalizer without type property set:

"normalizer": {
    "case_insensitive": {
           "filter": "lowercase"
     }
}

I assume that this is because in co.elastic.clients.elasticsearch._types.analysis.Normalizer#setupNormalizerDeserializer type is set to null.
I found similar issue related to Analyzer (#392 where co.elastic.clients.elasticsearch._types.analysis.Analyzer#setupAnalyzerDeserialize type is set to custom.

Temporary solution is to adjust the type manually but it's not ideal. Please confirm if it's a bug and when it'll be resolved.

final ObjectDeserializer unwrapped = (ObjectDeserializer) DelegatingDeserializer.unwrap(Normalizer._DESERIALIZER);
unwrapped.setTypeProperty("type", "custom");

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: SpecificationRelated to the API spec used to generate client code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions