Description of problem
I want to use the attachment processor and remove processor within an array of attachments. I am aware of the fact that the foreach processor is required for this purpose.
This enables the attachment processor and remove processor to be run on the individual elements of the array (https://www.elastic.co/guide/en/elasticsearch/plugins/current/ingest-attachment-with-arrays.html)
I dont find any good NEST(c#) examples for indexing an array of attachments and removing the content field. Can someone provide a NEST(C#) example for my use case?
UPDATE: Thanks to Russ Cam, It's now possible to index an array of attachments and remove base64 encoded file content with following pipeline:
_client.PutPipeline("attachments", p => p
.Description("Document attachments pipeline")
.Processors(pp => pp
.Foreach<ApplicationDto>(fe => fe
.Field(f => f.Attachments)
.Processor(fep => fep
.Attachment<Attachment>(a => a
.Field("_ingest._value._content")
.TargetField("_ingest._value.attachment")
)
)
).Foreach<ApplicationDto>(fe => fe
.Field(f => f.Attachments)
.Processor(fep => fep
.Remove<Attachment>(r => r
.Field("_ingest._value._content")
)
)
)
)
);