# Problem with ingest attachment plugin

**URL:** <https://discuss.elastic.co/t/problem-with-ingest-attachment-plugin/74012>\
**Category:** Elasticsearch\
**Created:** [February 6, 2017, 6:27am UTC](https://discuss.elastic.co/t/problem-with-ingest-attachment-plugin/74012 "2017-02-06T06:27:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sreejithyes](https://avatars.discourse-cdn.com/v4/letter/s/a587f6/32.png) [@sreejithyes](https://discuss.elastic.co/u/sreejithyes)\
**Post date:** [February 6, 2017, 6:27am UTC](https://discuss.elastic.co/t/problem-with-ingest-attachment-plugin/74012/1 "2017-02-06T06:27:33Z")

</div>

I have been using mapper attachment plugin with elasticsearch 2.4. I was using a complex mapping with multiple nested levels and inside some nested elements we had attachments. It was easy that i just need to use the type 'attachment' and the elasticsearch will automatically recognize it when i index any document.

Now I tried to update to version 5.2 and I used the ingest attachment plugin instead.

Now it is not recognizing the attachments. I tried to create the processor in different ways with foreach processor.

I am not sure how to specify the field and target field since it is inside multiple nested loops. Also the document/attachment is optional in a nested section. Also there can be multiple attachments in the document.

The mapping of the index we use is like:  
 ![](https://us1.discourse-cdn.com/elastic/original/2X/1/105fd8263033ccdf5194687dd6f189de5b14c717.png)

I tried to create the processor as:  
 ![](https://us1.discourse-cdn.com/elastic/original/2X/b/bc8633c446d3459c702173e52d4521e96d88ed85.png)

Please advice me how to create the processor.

Thanks in advance.  
Sreejith

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 6, 2017, 6:27am UTC](https://discuss.elastic.co/t/problem-with-ingest-attachment-plugin/74012/2 "2017-03-06T06:27:43Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
