-
Notifications
You must be signed in to change notification settings - Fork 264
Error deserializing co.elastic.clients.elasticsearch._types.analysis.Normalizer: Property 'type' not found #696
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Area: Specification
Related to the API spec used to generate client code
Comments
Hello, thanks for reporting this! Yes |
EuroLew
added a commit
to camunda/camunda
that referenced
this issue
Jan 9, 2025
encountered the elastic/elasticsearch-java#696 issue. Fixed in the updated version of the client
EuroLew
added a commit
to camunda/camunda
that referenced
this issue
Jan 10, 2025
encountered the elastic/elasticsearch-java#696 issue. Fixed in the updated version of the client
This was referenced Mar 4, 2025
github-merge-queue bot
pushed a commit
to camunda/camunda
that referenced
this issue
Mar 12, 2025
…7 to 8.8] (#29167) ## Description We dectected #29132 during migration testing > **TL;DR:** The problem lies in the ES java client version we are using, not being able to deserialize old index templates with normalizers defined and missing a type field. **Details (incl. root cause):** - We have an index template (operate-list-view), where we define a normalizer - In the past, the template or the normalizer configuration didn't need any type property (it was optional) - This means the type property is not set in the old templates (8.7) - Previously, we have used an old RestHighLevel client; with the CamundaExporter, we migrated to the ES java client - The newer ES java client (8.13.x) we use [is failing if the type property is not set](elastic/elasticsearch-java#696), as it uses a[ default null - this causes to fail the deserialization](https://github.com/elastic/elasticsearch-java/blob/8.13/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/Normalizer.java#L213) - This is a bug in the client and was fixed here [elastic/elasticsearch-java@cb0bb35#diff-9a776587666f90cd3feecd30d7bddaf145ea88c109db5a8fa70fa4b979c2fea1R213](elastic/elasticsearch-java@cb0bb35#diff-9a776587666f90cd3feecd30d7bddaf145ea88c109db5a8fa70fa4b979c2fea1R213) - This fix is available in 8.15+ ES clients ## What the PR does 1. Add a regression test that: 1. creates the schema in 8.7 2. Updates to 8.8 3. Exports data and awaits availability of data 4. ❌ This fails with old client 2. Update the ES export version to 8.16.4, see related discussion [here](https://camunda.slack.com/archives/C05QBRGMA9F/p1741170277082429?thread_ts=1741099983.818569&cid=C05QBRGMA9F) 1. Migrate all ES Client API broken usage in search clients, exporter, migration app and tests 1. I time boxed the migration of Optimize, but realized it will be a lot of work, see related commit 90e9b91 2. I stepped back, reverted the Optimize changes b5aa251, but kept them for transparency 3. I pinned Optimize to 8.13.4 ES version - 79aedb4 62a080a 4. \cc @RomanJRW 5. ✔️ Test is passing with newest client version 6. I had to bump the ES container version 9d50a99, as several tests were failing with using an older ES version and newer client, see #29167 (comment) <!-- Describe the goal and purpose of this PR. --> ## Related issues See https://camunda.slack.com/archives/C05QBRGMA9F/p1741099983818569 closes #29132
github-merge-queue bot
pushed a commit
to camunda/camunda
that referenced
this issue
Mar 12, 2025
…7 to 8.8] (#29167) ## Description We dectected #29132 during migration testing > **TL;DR:** The problem lies in the ES java client version we are using, not being able to deserialize old index templates with normalizers defined and missing a type field. **Details (incl. root cause):** - We have an index template (operate-list-view), where we define a normalizer - In the past, the template or the normalizer configuration didn't need any type property (it was optional) - This means the type property is not set in the old templates (8.7) - Previously, we have used an old RestHighLevel client; with the CamundaExporter, we migrated to the ES java client - The newer ES java client (8.13.x) we use [is failing if the type property is not set](elastic/elasticsearch-java#696), as it uses a[ default null - this causes to fail the deserialization](https://github.com/elastic/elasticsearch-java/blob/8.13/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/Normalizer.java#L213) - This is a bug in the client and was fixed here [elastic/elasticsearch-java@cb0bb35#diff-9a776587666f90cd3feecd30d7bddaf145ea88c109db5a8fa70fa4b979c2fea1R213](elastic/elasticsearch-java@cb0bb35#diff-9a776587666f90cd3feecd30d7bddaf145ea88c109db5a8fa70fa4b979c2fea1R213) - This fix is available in 8.15+ ES clients ## What the PR does 1. Add a regression test that: 1. creates the schema in 8.7 2. Updates to 8.8 3. Exports data and awaits availability of data 4. ❌ This fails with old client 2. Update the ES export version to 8.16.4, see related discussion [here](https://camunda.slack.com/archives/C05QBRGMA9F/p1741170277082429?thread_ts=1741099983.818569&cid=C05QBRGMA9F) 1. Migrate all ES Client API broken usage in search clients, exporter, migration app and tests 1. I time boxed the migration of Optimize, but realized it will be a lot of work, see related commit 90e9b91 2. I stepped back, reverted the Optimize changes b5aa251, but kept them for transparency 3. I pinned Optimize to 8.13.4 ES version - 79aedb4 62a080a 4. \cc @RomanJRW 5. ✔️ Test is passing with newest client version 6. I had to bump the ES container version 9d50a99, as several tests were failing with using an older ES version and newer client, see #29167 (comment) <!-- Describe the goal and purpose of this PR. --> ## Related issues See https://camunda.slack.com/archives/C05QBRGMA9F/p1741099983818569 closes #29132
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
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.
The text was updated successfully, but these errors were encountered: