Skip to content

Add append processor#15577

Merged
javanna merged 1 commit intoelastic:feature/ingestfrom
javanna:enhancement/push_processor
Dec 22, 2015
Merged

Add append processor#15577
javanna merged 1 commit intoelastic:feature/ingestfrom
javanna:enhancement/push_processor

Conversation

@javanna
Copy link
Copy Markdown
Contributor

@javanna javanna commented Dec 21, 2015

The append processor allows to append one or more values to an existing list; add a new list with the provided values if the field doesn't exist yet, or convert an existing scalar into a list and add the provided values to the newly created list.

This required adapting of IngestDocument#appendFieldValue behaviour, also added support for templating to it.

Closes #14324

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch. I must have missed those sleeps.

@martijnvg
Copy link
Copy Markdown
Member

LGTM

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @mvg question: I think we should create a list of maps in this case too? thinking more about it, not sure this special case that throws exception makes sense anymore.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point. I didn't think about that. The value to append can be an json object too, so yes the exception should be replaced with logic to deal with that.

@javanna javanna force-pushed the enhancement/push_processor branch from a1f83f6 to a8d7cc2 Compare December 22, 2015 14:06
@javanna
Copy link
Copy Markdown
Contributor Author

javanna commented Dec 22, 2015

heya @martijnvg I updated the PR.

@martijnvg
Copy link
Copy Markdown
Member

LGTM

The append processor allows to append one or more values to an existing list; add a new list with the provided values if the field doesn't exist yet, or convert an existing scalar into a list and add the provided values to the newly created  list.

This required adapting of IngestDocument#appendFieldValue behaviour, also added support for templating to it.

Closes elastic#14324
@javanna javanna force-pushed the enhancement/push_processor branch from f4c3ad3 to 46f99a1 Compare December 22, 2015 15:17
@javanna javanna merged commit 46f99a1 into elastic:feature/ingest Dec 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed/Ingest Node Execution or management of Ingest Pipelines >enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants