Hello, currently using elasticsearch-java 8.1.3 client to communicate with my es cluster. Index settings looks like this: "settings": { "index": { "number_of_shards": 1, "number_of_replicas": 7, "allocation.max_retries": 15 } }
According to the documentation, allocation.max_retries is still a valid setting but it's missing from co.elastic.clients.elasticsearch.indices.IndexSettings and Exception: co.elastic.clients.json.JsonpMappingException: Error deserializing co.elastic.clients.elasticsearch.indices.IndexSettings: Unknown field 'allocation.max_retries' (JSON path: index['allocation.max_retries']) (line no=1, column no=56, offset=55) is thrown when deserializing. Is this a mistake or I'm doing something wrong?
But my issue is not that the field is required and not received. The field does not exist and it is received. I tried: objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); but this did not fix my issue.
Found the issue. Exception is thrown when indexSettings object is created. Issue: indexSettings = settingsJson != null ? IndexSettings.of(i -> i.withJson(IOUtils.toInputStream(finalSettingsJson.toString(), StandardCharsets.UTF_8))) : null;
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.