Skip to content

PutPipelineRequest Json Parser ignores attachment processor #1099

@haarli

Description

@haarli

Java API client version

9.1.5

Java version

21

Elasticsearch Version

9.1.5

Problem description

We are trying to create a pipeline with two processors from a JSON file. The request returns successful, but only the "remove" processor is added. The "attachment" processor is ignored completely.
It works fine with the same JSON via cURL.

JSON:

{
    "description": "Extract attachment information",
    "processors": [
        {
            "attachment": {
                "target_field": "fileData.attachment",
                "field": "fileData.data"

            },
            "remove": {
                "field": "fileData.data"
            }
        }
    ]
}

Java API call:

//is is InputStream from file above
PutPipelineRequest pr = PutPipelineRequest.of(b -> b.id("attachment").withJson(is));
this.client.ingest().putPipeline(pr);

GET http://localhost:9200/_ingest/pipeline/attachment

{
    "attachment": {
        "description": "Extract attachment information",
        "processors": [
            {
                "remove": {
                    "field": [
                        "fileData.data"
                    ]
                }
            }
        ]
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Category: QuestionNot an issue but a question. May lead to enhancing docs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions