# Mapper-attachments don't work well with es 2.2.0

**URL:** <https://discuss.elastic.co/t/mapper-attachments-dont-work-well-with-es-2-2-0/43186>\
**Category:** Elasticsearch\
**Created:** [March 2, 2016, 2:30am UTC](https://discuss.elastic.co/t/mapper-attachments-dont-work-well-with-es-2-2-0/43186 "2016-03-02T02:30:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Haogle\_Haogle](https://avatars.discourse-cdn.com/v4/letter/h/ecae2f/32.png) [@Haogle\_Haogle](https://discuss.elastic.co/u/Haogle_Haogle)\
**Post date:** [March 2, 2016, 2:30am UTC](https://discuss.elastic.co/t/mapper-attachments-dont-work-well-with-es-2-2-0/43186/1 "2016-03-02T02:30:24Z")

</div>

Env:  
java version "1.8.0\_20",  
es: 2.2.0  
mapper-attchments version:2.2.0

ES and mapper-attchments run well from /\_plugin/head information.  
follow these steps of [https://github.com/elastic/elasticsearch-mapper-attachments#querying-or-accessing-metadata](https://github.com/elastic/elasticsearch-mapper-attachments#querying-or-accessing-metadata),

The below is mapping information:  
{  
"test" : {  
"mappings" : {  
"person" : {  
"properties" : {  
"file" : {  
"type" : "attachment",  
"fields" : {  
"content" : {  
"type" : "string"  
},  
"author" : {  
"type" : "string"  
},  
"title" : {  
"type" : "string"  
},  
"name" : {  
"type" : "string"  
},  
"date" : {  
"type" : "date",  
"format" : "strict\_date\_optional\_time||epoch\_millis"  
},  
"keywords" : {  
"type" : "string"  
},  
"content\_type" : {  
"type" : "string",  
"store" : true  
},  
"content\_length" : {  
"type" : "integer"  
},  
"language" : {  
"type" : "string"  
}  
}  
}  
}  
}  
}  
}  
}

I get the following output when [http://localhost:9200/test/person/\_search?pretty=1](http://localhost:9200/test/person/_search?pretty=1)

{  
"took" : 6,  
"timed\_out" : false,  
"\_shards" : {  
"total" : 5,  
"successful" : 5,  
"failed" : 0  
},  
"hits" : {  
"total" : 1,  
"max\_score" : 1.0,  
"hits" : [ {  
"\_index" : "test",  
"\_type" : "person",  
"\_id" : "1",  
"\_score" : 1.0,  
"\_source" : {  
"file" : "IkdvZCBTYXZlIHRoZSBRdWVlbiIgKGFsdGVybmF0aXZlbHkgIkdvZCBTYXZlIHRoZSBLaW5nIg=="  
}  
} ]  
}  
}

thanks for any suggestion.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 2, 2016, 6:25am UTC](https://discuss.elastic.co/t/mapper-attachments-dont-work-well-with-es-2-2-0/43186/2 "2016-03-02T06:25:31Z")

</div>

Nothing is wrong here. What do you expect?

---

<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, 11:12pm UTC](https://discuss.elastic.co/t/mapper-attachments-dont-work-well-with-es-2-2-0/43186/3 "2017-07-05T23:12:10Z")

</div>


