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

update foreach processor to only support one applied processor. #19402

Merged
merged 1 commit into from
Jul 13, 2016

Conversation

talevy
Copy link
Contributor

@talevy talevy commented Jul 12, 2016

Historically, Foreach Processor supported the application of multiple processors on the elements of the list it was being applied to. To make things a bit more consistent with the "do one thing" mentality of the processors, this PR limits foreach to only apply one processor per field.

Closes #19345.

List<Processor> processors = ConfigurationUtils.readProcessorConfigs(processorConfigs, factories);
return new ForEachProcessor(tag, field, Collections.unmodifiableList(processors));
Map<String, Map<String, Object>> processorConfig = readMap(TYPE, tag, config, "processor");
Iterator<Map.Entry<String, Map<String, Object>>> it = processorConfig.entrySet().iterator();
Copy link
Member

Choose a reason for hiding this comment

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

maybe throw an error if processorConfig.entrySet().size != 1?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

true, guess I only checked that there was at least one. I'll update

@martijnvg
Copy link
Member

This change looks good. I left one question. Additionally also the docs need to be updated.

@talevy
Copy link
Contributor Author

talevy commented Jul 13, 2016

thanks for the review @martijnvg, I'll update accordingly

@talevy talevy force-pushed the all-for-one-and-one-for-all branch from 6413d80 to a89aa28 Compare July 13, 2016 17:28
@talevy
Copy link
Contributor Author

talevy commented Jul 13, 2016

updated!

@martijnvg
Copy link
Member

LGTM

@talevy talevy merged commit 8fd0155 into elastic:master Jul 13, 2016
@talevy talevy deleted the all-for-one-and-one-for-all branch July 13, 2016 20:13
Mpdreamz added a commit to elastic/elasticsearch-net that referenced this pull request Sep 27, 2016
Mpdreamz added a commit to elastic/elasticsearch-net that referenced this pull request Sep 27, 2016
deprecate _ttl/_timestamp and remove them from our tests as per elastic/elasticsearch#18980 so that migrated 2.x indices do not have their code altered (just yet)

explicit 5.x spec generation

fix failing nodes test because  is removed as per elastic/elasticsearch#19218

fixed failing integration tests due to lang no longer defaulting to groovy elastic/elasticsearch#19960

fields => stored fields, updated failing cathelp tests due to endpoint changing

suggest response is now generic and gets _source returned in accordance with elastic/elasticsearch#19536

histogram key double not long

source filtering include and exclude are now plural

script fields tests did not explicitly specify groovy

search's StoredFields still sent

get task api tests wreaked havoc on the readonly tests

scripted metric did not specify lang

set script.max_compilations_per_minute on node

fix top hits not setting groovy explicitly

multi search now response 404 properly

multitermvector tests making sure it took more then 0 is no longer reliable beta1 is too fast :)

foreach put pipeline processors is no longer an array as per elastic/elasticsearch#19402

revert field=>stored_fields rename on update request

remove propery name with dot failure assertion integration test, no longer valid since elastic/elasticsearch#19899

use existing elasticsearch node in test framework could still spawn a new java process

revert field=>stored_fields rename on update request

get pipeline api is now dictionary based as per elastic/elasticsearch#19685

xpack beta1 related fixes

reindex tests not setting all waithandles and taking 3 minutes for no good reason

missing fieldsecurity class

fix post integration test failures unit test failures

add back run as tests now that we send the right header in the beta1 world
Mpdreamz added a commit to elastic/elasticsearch-net that referenced this pull request Oct 10, 2016
* removed deleted file from csproj

deprecate _ttl/_timestamp and remove them from our tests as per elastic/elasticsearch#18980 so that migrated 2.x indices do not have their code altered (just yet)

explicit 5.x spec generation

fix failing nodes test because  is removed as per elastic/elasticsearch#19218

fixed failing integration tests due to lang no longer defaulting to groovy elastic/elasticsearch#19960

fields => stored fields, updated failing cathelp tests due to endpoint changing

suggest response is now generic and gets _source returned in accordance with elastic/elasticsearch#19536

histogram key double not long

source filtering include and exclude are now plural

script fields tests did not explicitly specify groovy

search's StoredFields still sent

get task api tests wreaked havoc on the readonly tests

scripted metric did not specify lang

set script.max_compilations_per_minute on node

fix top hits not setting groovy explicitly

multi search now response 404 properly

multitermvector tests making sure it took more then 0 is no longer reliable beta1 is too fast :)

foreach put pipeline processors is no longer an array as per elastic/elasticsearch#19402

revert field=>stored_fields rename on update request

remove propery name with dot failure assertion integration test, no longer valid since elastic/elasticsearch#19899

use existing elasticsearch node in test framework could still spawn a new java process

revert field=>stored_fields rename on update request

get pipeline api is now dictionary based as per elastic/elasticsearch#19685

xpack beta1 related fixes

reindex tests not setting all waithandles and taking 3 minutes for no good reason

missing fieldsecurity class

fix post integration test failures unit test failures

add back run as tests now that we send the right header in the beta1 world

* make sure code is generated of master after mass picking commits of 5.x branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP >enhancement v5.0.0-alpha5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants