-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Conversation
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(); |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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
This change looks good. I left one question. Additionally also the docs need to be updated. |
thanks for the review @martijnvg, I'll update accordingly |
6413d80
to
a89aa28
Compare
updated! |
LGTM |
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
* 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
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.