# Elasticsearch - Index a email containing image and text

**URL:** <https://discuss.elastic.co/t/elasticsearch-index-a-email-containing-image-and-text/60968>\
**Category:** Elasticsearch\
**Created:** [September 20, 2016, 6:23am UTC](https://discuss.elastic.co/t/elasticsearch-index-a-email-containing-image-and-text/60968 "2016-09-20T06:23:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Meenal.Luktuke](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/meenal.luktuke/32/7795_2.png) [@Meenal.Luktuke](https://discuss.elastic.co/u/Meenal.Luktuke)\
**Post date:** [September 20, 2016, 6:23am UTC](https://discuss.elastic.co/t/elasticsearch-index-a-email-containing-image-and-text/60968/1 "2016-09-20T06:23:48Z")

</div>

Hi,

I have to index emails which contain text and images both. I have looked at LIRE and mapper attachment plugin but is there a way to combine both?

 ![](https://us1.discourse-cdn.com/elastic/original/2X/1/100a3f076880f98d8cc1a0a3ad475a107d523b07.PNG)

This is a image of my email. I also want to extract fields like place, date and time. This is just a sample, actual data may be different.

Thanks,  
Meenal

---

<div class="post-metadata">

**Author:** ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)\
**Post date:** [September 20, 2016, 10:42am UTC](https://discuss.elastic.co/t/elasticsearch-index-a-email-containing-image-and-text/60968/2 "2016-09-20T10:42:38Z")

</div>

I am familiar with neither of these plugins, but for the record, this is something that you could do on client-side as well, by extracting the MIME parts from the email and building a document from the (meta)data manually.

---

<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:** [July 5, 2017, 10:18pm UTC](https://discuss.elastic.co/t/elasticsearch-index-a-email-containing-image-and-text/60968/3 "2017-07-05T22:18:55Z")

</div>


