I am looking for a way to use the Ingest Attachment Processor Plugin from the Java High-level REST client.
It seems that you need to do two steps, i.e., first you define a pipeline containing the attachment processor (e.g., referring to a field data and using a pipeline id attachment)
PUT _ingest/pipeline/attachment
{
"description" : "Extract attachment information",
"processors" : [
{
"attachment" : {
"field" : "data"
}
}
]
}
then you PUT data referring to the field (here data) and the pipeline (here attachment)
PUT my_index/my_type/my_id?pipeline=attachment
{
"data": "e1xydGYxXGFuc2kNCkxvcmVtIGlwc3VtIGRvbG9yIHNpdCBhbWV0DQpccGFyIH0="
}
Now I want to execute these two steps from the Java High-level REST client. It seems that I can execute the first step (definition of the pipeline) with the Put Pipeline API, but I could not find a Java mechanisms for the second part, i.e., writing the actual data while referring to the pipeline.