Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Create an XContent parser for Processors in pipelines. #55

Closed
dbwiddis opened this issue Sep 25, 2023 · 0 comments · Fixed by #47
Closed

[FEATURE] Create an XContent parser for Processors in pipelines. #55

dbwiddis opened this issue Sep 25, 2023 · 0 comments · Fixed by #47
Assignees
Labels
enhancement New feature or request

Comments

@dbwiddis
Copy link
Member

Is your feature request related to a problem?

Template parsing implemented in #47 assumes only one layer of nesting (e.g., a map object in Map<String, Object> will always be a Map<String, String>. This assumption isn't always true as shown in #44 where some manual content parsing was done.

What solution would you like?

Create an XContent parser for Processors in pipelines.

What alternatives have you considered?

Representing the processor JSON (below) in a string in the User Template. This would work but gets very ugly very fast as all the quotes need to be escaped.

Do you have any additional context?

All pipeline configuration formats follow a similar pattern :

{
    "description" : "",
    "processors": [
        {
             "processor1" : {
                 // required inputs
             }
         },
         {
             "processor2" : {
                 // required inputs
             }
         },
         ....
         ...
    ]
}

We can definitely generalize the creation of the configuration as long as the workflow data has a list of processors and their required inputs. The processors themselves vary in terms of format, so doing it this way would require some xcontent builder for each type of processor, since we'll need to write to specific fields.

Originally posted by @joshpalis in #44 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants