Nested index settings that do not end up deserialized in otherSettings leads to requiring properties on parent JSON nodes
@l-trotta ya está trabajando en esto.
Desde el 2/10/2026.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- java
- Área
- backend-api-design, search
Línea de trabajo
Start by reproducing the create and getSettings calls from the issue against an existing Elasticsearch cluster, focusing on deserialization of nested index settings and otherSettings. Trace how the returned JSON is mapped when an unknown nested key appears without the required parent property. Done means getSettings succeeds for this case while preserving unknown settings as described.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Java API client version
8.14.3
Java version
21
Elasticsearch Version
8.19.11
Problem description
I'm working with elasticsearch-java against existing Elasticsearch clusters and indices, and I noticed strange behavior with regards to index settings.
Consider this snippet:
ElasticsearchClient client = ...
client.indices()
.create(create -> create.index("test-index")
.settings(settings -> settings.numberOfShards("1")
.numberOfReplicas("0")
.otherSettings("index.store.fs.fs_lock", JsonData.of("simple"))));
client.indices().getSettings(settings -> settings.index("test-index"));
The above fails on getSettings with this exception:
co.elastic.clients.util.MissingRequiredPropertyException: Missing required property 'Storage.type' (JSON path: ['test-index'].settings.index.store) (line no=1, column no=256, offset=255)
I think the problem is when we do not specify includeDefaults - the JSON structure comes back without the required type field under store - but when index.store.fs.fs_lock comes back in the nested structure, the tokenization sees store and expects a full Storage object, including type which is required.
One approach would be to encode every possible index setting into the specification, but this would require an Elasticsearch client upgrade. My understanding is that the Java client is meant to be forward compatible with all Elasticsearch clusters. (Of course, any fix would require an upgrade to pick up - but I'm speaking more generically in principle for all settings this could apply to in the future)
The example above is contrived - in practice what can come up is inheriting Elasticsearch clusters that had these index settings already provisioned (perhaps, for example, from usage of RestHighLevelClient in the past) and then using the elasticsearch-java client ends up breaking on this API call. I'm also quite sure this could come up with arbitrary index settings.
I would expect the desired behavior to be:
- Prune the returned JSON of all settings that are not recognized in the specification, recursively eliminating any blocks that become empty
- Put all the unknown settings into
otherSettingswith flat keys
But the above isn't elegant because of two JSON walkthrough passes, so open to other suggestions or thoughts.
- Lenguaje dominante
- Java
- Estrellas
- 525
- Forks
- 299
- Merge medio
- 16 h 25 min
- PR fusionados (30 d)
- 4
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de elastic/elasticsearch-java
-
Transport options set on the client builder drop SafeResponseConsumerPosiblemente ocupada @RaphaelFakhri la tomó hace 10 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 54/100
elastic/elasticsearch-java#1354 ·
-
`rebuild()` of bulk operations (`IndexOperation`, `CreateOperation`, `UpdateOperation`) drops most fieldsPosiblemente ocupada @l-trotta la tomó hace 14 días. AbiertoArea: Generator Category: Bug
Dificultad 3/5 1-2 días Aptitud para principiantes 50/100
elastic/elasticsearch-java#1353 · 1 comentario · 1 asignado ·
-
Delete By Query deserialization will not account for search failuresPosiblemente ocupada @l-trotta la tomó hace 27 días. Abierto
elastic/elasticsearch-java#1349 · 1 comentario · 1 asignado ·
-
RestClientTransport sends bulk bodies as one HTTP chunk / TLS record / syscall per NDJSON buffer, burning ~45x the reactor CPU of the HLRCQuizá libre de nuevo @l-trotta la tomó hace 43 días y no hay ningún pull request abierto. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
elastic/elasticsearch-java#1339 · 7 comentarios · 1 asignado ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 45/100
elastic/elasticsearch-java#1212 · 8 comentarios ·
Todos los issues de elastic/elasticsearch-java
Issues similares
-
Update samples to Citrus 5.1.0Posiblemente ocupada @asuruceanu la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
snowflakedb/snowflake-kafka-connector#1610 ·
Los mantenedores suelen responder en 1 día
-
add multipart/form-data exampleAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
swagger-api/swagger-petstore#245 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
liquid-java/liquidjava#443 ·
Los mantenedores suelen responder en 2 días