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
{
"description": "test",
"processors": [
{
"remove": {
"keep": ["properties", "firstName", "lastName"],
"description": "Remove the fields other than expected (please also see index-definition)"
}
}
]
}
We do:
<dataFile>.getInputStream().bufferedReader().use { bufferedReader ->
val objectMapper = jacksonObjectMapper()
val dataTransformationDefinition = objectMapper.readValue<Map<String, Any>>(bufferedReader)
val processorList = dataTransformationDefinition["processors"] as List<*>
val processors = processorList
.map { processor -> objectMapper.writeValueAsString(processor) }
.map { processorJson ->
Processor.Builder().withJson(processorJson.byteInputStream()).build()
}
// create ingest pipeline via Elasticsearch client and PutPipelineRequest
}
But this fails with:
Original Stack Trace:
at co.elastic.clients.json.ObjectDeserializer.parseUnknownField(ObjectDeserializer.java:233)
at co.elastic.clients.json.ObjectDeserializer.deserialize(ObjectDeserializer.java:190)
at co.elastic.clients.json.ObjectDeserializer.deserialize(ObjectDeserializer.java:148)
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.deserialize(ObjectDeserializer.java:192)
at co.elastic.clients.util.WithJsonObjectBuilderBase.withJson(WithJsonObjectBuilderBase.java:54)
at co.elastic.clients.json.WithJson.withJson(WithJson.java:43)
The reason is that the keep field is not present in RemoveProcessor deserializer
Hello, thanks for reporting this! It's an issue in the API specification used to produce the Java code, we'll fix this and then regenerate the code to solve the issue.
Java API client version
8.7.0
Java version
17
Elasticsearch Version
8.5.2
Problem description
Given following pipeline definition:
We do:
But this fails with:
The reason is that the
keep
field is not present in RemoveProcessor deserializerelasticsearch-java/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/RemoveProcessor.java
Line 181 in 9188e9b
The text was updated successfully, but these errors were encountered: