Do not conditionally gate remove processor (#141310)

This commit is contained in:
Sean Story 2022-09-23 13:44:20 -05:00 committed by GitHub
parent 28924818e4
commit d45ab6dbaa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -150,29 +150,6 @@ export const createIndexPipelineDefinitions = (
tag: 'remove_replacement_chars',
},
},
{
remove: {
field: [
'_attachment',
'_attachment_indexed_chars',
'_extracted_attachment',
'_extract_binary_content',
],
if: 'ctx?._extract_binary_content == true',
ignore_missing: true,
on_failure: [
{
append: {
field: '_ingestion_errors',
value: [
"Processor 'remove' with tag 'remove_attachment_fields' in pipeline '{{ _ingest.on_failure_pipeline }}' failed with message '{{ _ingest.on_failure_message }}'",
],
},
},
],
tag: 'remove_attachment_fields',
},
},
{
gsub: {
field: 'body',
@ -212,20 +189,26 @@ export const createIndexPipelineDefinitions = (
},
{
remove: {
field: ['_reduce_whitespace'],
if: 'ctx?._reduce_whitespace == true',
field: [
'_attachment',
'_attachment_indexed_chars',
'_extracted_attachment',
'_extract_binary_content',
'_reduce_whitespace',
'_run_ml_inference',
],
ignore_missing: true,
on_failure: [
{
append: {
field: '_ingestion_errors',
value: [
"Processor 'remove' with tag 'remove_whitespace_fields' in pipeline '{{ _ingest.on_failure_pipeline }}' failed with message '{{ _ingest.on_failure_message }}'",
"Processor 'remove' with tag 'remove_meta_fields' in pipeline '{{ _ingest.on_failure_pipeline }}' failed with message '{{ _ingest.on_failure_message }}'",
],
},
},
],
tag: 'remove_whitespace_fields',
tag: 'remove_meta_fields',
},
},
],