# Recommendation about storing too large XML as attachment to be searched

**URL:** <https://discuss.elastic.co/t/recommendation-about-storing-too-large-xml-as-attachment-to-be-searched/39555>\
**Category:** Elasticsearch\
**Created:** [January 19, 2016, 3:10pm UTC](https://discuss.elastic.co/t/recommendation-about-storing-too-large-xml-as-attachment-to-be-searched/39555 "2016-01-19T15:10:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paco\_B](https://avatars.discourse-cdn.com/v4/letter/p/ecb155/32.png) [@Paco\_B](https://discuss.elastic.co/u/Paco_B)\
**Post date:** [January 19, 2016, 3:10pm UTC](https://discuss.elastic.co/t/recommendation-about-storing-too-large-xml-as-attachment-to-be-searched/39555/1 "2016-01-19T15:10:20Z")

</div>

Hello,

I would like to know your recomendation about storing too large (more than 16 MB) XML as attachment in Elastic Search using mapper attachment.

Is a good idea to store this kind of files in Elastic Search if we want to search by one of the internal tag via Elastic Search?

Is there any performance document about the mapper attachment and/or Elastic Search behavior with this kind of fields when storing and/or searching?

Many thanks!

Regards,  
Paco.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 20, 2016, 9:43pm UTC](https://discuss.elastic.co/t/recommendation-about-storing-too-large-xml-as-attachment-to-be-searched/39555/2 "2016-01-20T21:43:37Z")

</div>

What do you want to search on exactly?

---

<div class="post-metadata">

**Author:** ![Paco\_B](https://avatars.discourse-cdn.com/v4/letter/p/ecb155/32.png) [@Paco\_B](https://discuss.elastic.co/u/Paco_B)\
**Post date:** [January 20, 2016, 11:10pm UTC](https://discuss.elastic.co/t/recommendation-about-storing-too-large-xml-as-attachment-to-be-searched/39555/3 "2016-01-20T23:10:15Z")

</div>

Thanks for your reply Mark,

This is the idea:

I have a MongoDB database with different collections, but one of them has a field with a XML value. This XML could be greater than 16 MB, so I created a Jira ticket in MongoDB support to ask how to resolve this problem. The recommendation was to use GridFS (MongoDB store mechanism in binary format) and ES as search engine over this field to find specific tag inside the value.

I used the "mongo-connector" plugin to have the MongoDB data in ES. I download the elasticsearch-mapper-attachments plugin to support the GridFS implementation, and I understood that ES, when receives this kind of data, could index it and search by whatever String content.

FYI - I opened another [ticket](https://discuss.elastic.co/t/search-attachment-content/39559/5) in your Website but asking about a problem to do queries using the query engine over MongoDB GridFS in ES.

So, I would like to know when we have data loaded via MongoDB (using GridFS), if it is a good idea to do search over large XML.

Many thanks.

Regards,  
Paco.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 21, 2016, 1:13am UTC](https://discuss.elastic.co/t/recommendation-about-storing-too-large-xml-as-attachment-to-be-searched/39555/4 "2016-01-21T01:13:02Z")

</div>

Given it's the same as [Search - Attachment - Content](https://discuss.elastic.co/t/search-attachment-content/39559/), let's keep the conversation there 🙂

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 21, 2016, 1:13am UTC](https://discuss.elastic.co/t/recommendation-about-storing-too-large-xml-as-attachment-to-be-searched/39555/5 "2016-01-21T01:13:06Z")

</div>


