# Mapper-attachments

**URL:** <https://discuss.elastic.co/t/mapper-attachments/46615>\
**Category:** Elasticsearch\
**Created:** [April 7, 2016, 12:28am UTC](https://discuss.elastic.co/t/mapper-attachments/46615 "2016-04-07T00:28:14Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![AdaYang](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@AdaYang](https://discuss.elastic.co/u/AdaYang)\
**Post date:** [April 7, 2016, 12:28am UTC](https://discuss.elastic.co/t/mapper-attachments/46615/1 "2016-04-07T00:28:14Z")

</div>

I am trying to install mapper-attachments for es 2.3.1. if follow [https://www.elastic.co/guide/en/elasticsearch/plugins/current/mapper-attachments.html](https://www.elastic.co/guide/en/elasticsearch/plugins/current/mapper-attachments.html) it would install mapper-attachments 2.3.1 (same as es). but here [GitHub - elastic/elasticsearch-mapper-attachments: Mapper Attachments Type plugin for Elasticsearch](https://github.com/elastic/elasticsearch-mapper-attachments) looks the version are different. if I need to install from the later link, what does this mean?

> 2.1 elasticsearch repository github?

I tried to install the plugin from the zip file elasticsearch-mapper-attachments-master.zip, it said NOTE: Unable to verify checksum for downloaded plugin (unable to find .sha1 or .md5 file to verify)  
ERROR: Could not find plugin descriptor 'plugin-descriptor.properties' in plugin zip

so a little confusing..

thanks!

---

<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:** [April 7, 2016, 5:29am UTC](https://discuss.elastic.co/t/mapper-attachments/46615/2 "2016-04-07T05:29:13Z")

</div>

Just read the guide (the first link you provided).

[https://www.elastic.co/guide/en/elasticsearch/plugins/current/mapper-attachments.html#mapper-attachments-install](https://www.elastic.co/guide/en/elasticsearch/plugins/current/mapper-attachments.html#mapper-attachments-install)

If you read the very first lines of the README in the GitHub repo you would see also the link to this guide.

---

<div class="post-metadata">

**Author:** ![AdaYang](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@AdaYang](https://discuss.elastic.co/u/AdaYang)\
**Post date:** [April 7, 2016, 4:22pm UTC](https://discuss.elastic.co/t/mapper-attachments/46615/3 "2016-04-07T16:22:42Z")

</div>

thanks. I got your point.

---

<div class="post-metadata">

**Author:** ![AdaYang](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@AdaYang](https://discuss.elastic.co/u/AdaYang)\
**Post date:** [April 7, 2016, 6:33pm UTC](https://discuss.elastic.co/t/mapper-attachments/46615/4 "2016-04-07T18:33:33Z")

</div>

Very wired here.

here is my env:

[http://localhost:9200/\_nodes/plugins?pretty](http://localhost:9200/_nodes/plugins?pretty)

```
{
  "cluster_name" : "elasticsearch",
  "nodes" : {
    "hYCvRc1yQSK3BoClf5C5zQ" : {
      "name" : "Destroyer of Demons",
      "transport_address" : "127.0.0.1:9300",
      "host" : "127.0.0.1",
      "ip" : "127.0.0.1",
      "version" : " **2.3.1"** ,
      "build" : "bd98092",
      "http_address" : "127.0.0.1:9200",
      "plugins" : [ {
        "name" : " **mapper-attachments**",
        "version" : **"2.3.1",**
        ...
      } ],

```

mapping is:

```
"tech": {
    "mappings": {
      "manual": {
        "properties": {
          "file": {
            "type": "attachment",
            "fields": {
              "content": {
                "type": "string"
              },
              "author": {
                "type": "string"
              },
              " **title**": {
                "type": "string",
                "store": true
              },
              " **name**": {
                "type": "string"
              },
              "date": {
                "type": "string",
                "store": true
              },
              " **keywords**": {
                "type": "string",
                "store": true
              },
              " **content_type**": {
                "type": "string",
                "store": true
              },
              "content_length": {
                "type": "string",
                "store": true
              },
              " **language**": {
                "type": "string",
                "store": true
              }
            }
          }
        }
      }

```

I am able to see the content of the indexed document:

```
   "_source": {
      "file": {
        "_content": "JVBERi0xLjcNJeLjz9MNCg==M......=ZW5kc3RyZWFtDWVuZG9iag1zdGFydHhyZWYNCg==MTE2DQo=JSVFT0YNCg=="
        "_name": "12-240.pdf",
        "_title": "12-240.pdf",
        "_keywords": "Div42 Src580 LGE Mechtech",
        "_language": "en",
        "_content_type": "pdf"
}

```

but when I search

```
curl -XGET "http://localhost:9200/tech/manual/_search" -d'
{
  "fields": ["file.content_type", "file.title", "file.keywords", "file.language", "file.name"], 
  "query": {
   "match_all": {}
  }
}'

```

the response has no file.keywords, file.language, and [file.name](http://file.name) as follow, I also can't search on these fields.

```
 "hits": {
    "total": 1,
    "max_score": 0.30685282,
    "hits": [
      {
        "_index": "tech",
        "_type": "manual",
        "_id": "AVPx8cRH4bGZ_KKaUS0y",
        "_score": 0.30685282,
        "fields": {
          "file.content_type": [
            "pdf"
          ],
          "file.title": [
            "12-240"
          ]
        }
      }
    ]
  }

```

what's possible not right?  
Thanks!

---

<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:** [April 8, 2016, 7:48am UTC](https://discuss.elastic.co/t/mapper-attachments/46615/5 "2016-04-08T07:48:24Z")

</div>

Thank you for reporting.

I was able to reproduce it with a Java test in master branch.

**EDIT** : actually we never implemented or documented that: [https://www.elastic.co/guide/en/elasticsearch/plugins/current/mapper-attachments-usage.html](https://www.elastic.co/guide/en/elasticsearch/plugins/current/mapper-attachments-usage.html)

The only values you can force are `_content_type`, `_name` and `_language`. Not that the later only works if you set `index.mapping.attachment.detect_language: true`.

---

<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:** [April 8, 2016, 8:11am UTC](https://discuss.elastic.co/t/mapper-attachments/46615/6 "2016-04-08T08:11:47Z")

</div>

I added this [PR](https://github.com/elastic/elasticsearch/pull/17612) to get this fully covered by a test.

Note that mapper-attachments is deprecated in 5.0.0 so people should then use [ingest-attachment plugin](https://www.elastic.co/guide/en/elasticsearch/plugins/master/ingest-attachment.html) instead.

---

<div class="post-metadata">

**Author:** ![AdaYang](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@AdaYang](https://discuss.elastic.co/u/AdaYang)\
**Post date:** [April 8, 2016, 5:04pm UTC](https://discuss.elastic.co/t/mapper-attachments/46615/7 "2016-04-08T17:04:35Z")

</div>

Thanks dadoonet! I got it. Yes thought to get things to work before going to 5.0.0.

---

<div class="post-metadata">

**Author:** ![valerioorfano](https://avatars.discourse-cdn.com/v4/letter/v/ba9def/32.png) [@valerioorfano](https://discuss.elastic.co/u/valerioorfano)\
**Post date:** [July 29, 2016, 6:22pm UTC](https://discuss.elastic.co/t/mapper-attachments/46615/8 "2016-07-29T18:22:59Z")

</div>

Hi David

I'm using ES 2.3.4 and trying to install mapping-attachments without success (downloaded from internet)! What is the correct zip file i should be using? Could u please post the correct url? I cannot figure it out!

Please help me out!

thanx valerio

---

<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:** [July 29, 2016, 6:45pm UTC](https://discuss.elastic.co/t/mapper-attachments/46615/9 "2016-07-29T18:45:57Z")

</div>

Why hacking an old thread?

What did you try so far?  
Did you read the plugin documentation which explains how to install it?

---

<div class="post-metadata">

**Author:** ![valerioorfano](https://avatars.discourse-cdn.com/v4/letter/v/ba9def/32.png) [@valerioorfano](https://discuss.elastic.co/u/valerioorfano)\
**Post date:** [July 29, 2016, 7:14pm UTC](https://discuss.elastic.co/t/mapper-attachments/46615/10 "2016-07-29T19:14:30Z")

</div>

Hi david and thx.

1 I ve tried bin/plugin install mapping-attachements but it cannot find the file to download from different websites.  
2 I ve trid to install the mapping-attachments-master.zip file locally(downloaded from github) but i get an error :ERROR: Could not find plugin descriptor 'plugin-descriptor.properties' in plugin zip  
3 I've tried to add plugin-descriptor.properties filled-out manually to the zip file in the root directory, but i get another error regarding missing \_source file.

I need to show the elastic search to my customer who is interested into full -text search in pdf file....

Any help is appreciated, i am using ES 2.3.4

---

<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:** [July 29, 2016, 7:33pm UTC](https://discuss.elastic.co/t/mapper-attachments/46615/11 "2016-07-29T19:33:22Z")

</div>

If you copy and paste from the doc it should work.

mapper not mapping is probably your problem here.

---

<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:31pm UTC](https://discuss.elastic.co/t/mapper-attachments/46615/12 "2017-07-05T22:31:39Z")

</div>


