Hello,
How can I index multiple attachments within one document, as explained in https://www.elastic.co/guide/en/elasticsearch/plugins/7.5/ingest-attachment-with-arrays.html , but without storing the base64 data?
My ingest pipeline looks like this:
PUT _ingest/pipeline/attachment
{
"processors": [
{
"foreach": {
"field": "attachments",
"processor": {
"attachment": {
"field": "_ingest._value.data",
"ignore_failure": true,
"properties": [
"content"
],
"target_field": "_ingest._value.attachment"
}
}
}
}
]
}
I tried the solution given in
Ingest Attachment processor pipeline, but without storing base64 data , trying a few variants like the one below, but this doesn't seem to work when combined with the foreach construction.
PUT _ingest/pipeline/attachment
{
"processors": [
{
"foreach": {
"field": "attachments",
"processor": {
"attachment": {
"field": "_ingest._value.data",
"ignore_failure": true,
"properties": [
"content"
],
"target_field": "_ingest._value.attachment"
}
}
}
},
{
"remove": {
"field": "attachments.data"
}
}
]
}
In the above case I got "[data] is not an integer, cannot be used as an index as part of path" which doesn't make much sense to me.
Is there a different ingest pipeline config I could use to index an array of attachments without their base64 contents?