# Attachment mapping without any meta data

**URL:** <https://discuss.elastic.co/t/attachment-mapping-without-any-meta-data/4196>\
**Category:** Elasticsearch\
**Created:** [April 6, 2011, 3:28pm UTC](https://discuss.elastic.co/t/attachment-mapping-without-any-meta-data/4196 "2011-04-06T15:28:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![js1](https://avatars.discourse-cdn.com/v4/letter/j/51bf81/32.png) [@js1](https://discuss.elastic.co/u/js1)\
**Post date:** [April 6, 2011, 3:28pm UTC](https://discuss.elastic.co/t/attachment-mapping-without-any-meta-data/4196/1 "2011-04-06T15:28:29Z")

</div>

Hi,  
first of all, I really appreciate the work of elasticsearch. It is the  
second application where we use elasticsearch for the search und  
storage part. This time we wanted to use the attachment plugin as we  
do have to store mainly text documents which shall also be searchable.  
What works so far is the mapping and storing of documents, mainly .pdf  
and .docs. But what is not working is the automatically adding of meta  
data on the attachment. I checked it with Tika itself by simply  
calling the java command line and Tika shows the meta data of a pdf  
document. But when I map the pdf via elasticsearch only the content of  
the file is stored. Is there any known bug which I have overseen? Or  
is the mapping file wrong?  
{  
"myindextype" : {  
"\_all" : {"enabled" : true},  
"properties" : {  
"document" : {  
"properties" : {  
"content" : {  
"type" : "attachment",  
"store":"yes",  
"fields" : {  
"file" : { "store" : "yes",  
"index" : "not\_analyzed" },  
"date" : { "store" : "yes",  
"index" : "not\_analyzed" },  
"author" : { "store" : "yes",  
"index" : "not\_analyzed" },  
"keywords" : { "store" : "yes",  
"index" : "analyzed" }  
}  
}  
}  
}  
}  
}  
}  
Or do I have to do anything else in order to get this running?

Thank you.

---

<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 6, 2017, 4:08am UTC](https://discuss.elastic.co/t/attachment-mapping-without-any-meta-data/4196/2 "2017-07-06T04:08:46Z")

</div>


