# Mapper parsing exception even after installed ingest attachment 5.0.1

**URL:** <https://discuss.elastic.co/t/mapper-parsing-exception-even-after-installed-ingest-attachment-5-0-1/66335>\
**Category:** Elasticsearch\
**Created:** [November 17, 2016, 6:58am UTC](https://discuss.elastic.co/t/mapper-parsing-exception-even-after-installed-ingest-attachment-5-0-1/66335 "2016-11-17T06:58:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![radsan84](https://avatars.discourse-cdn.com/v4/letter/r/edb3f5/32.png) [@radsan84](https://discuss.elastic.co/u/radsan84)\
**Post date:** [November 17, 2016, 6:58am UTC](https://discuss.elastic.co/t/mapper-parsing-exception-even-after-installed-ingest-attachment-5-0-1/66335/1 "2016-11-17T06:58:10Z")

</div>

Hi,  
I installed elastic search 5.0.1 in Unix and installed 'ingest\_Attachment\_5.0.1' (Also restarted after ingest attachment installation).  
I created an index using command : curl -X PUT 10.242.104.46:9200/test1.  
Then when i tried creating mapping, i got an error as shown below. Please help to resolve this,

curl -XPUT '[http://10.242.104.46:9200/test1/person/\_mapping](http://10.242.104.46:9200/test1/person/_mapping)' -d '{  
"person": {  
"properties": {  
"file": {  
"type": "attachment",  
"path": "full",  
"fields": {  
"file": {  
"type": "string",  
"term\_vector":"with\_positions\_offsets",  
"store": true  
}  
}  
}  
}  
}  
}'

{"error":{"root\_cause":[{"type":"mapper\_parsing\_exception","reason":"No handler for type [attachment] declared on field [file]"}],"type":"mapper\_parsing\_exception","reason":"No handler for type [attachment] declared on field [file]"},"status":400}.

---

<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:** [November 17, 2016, 7:16am UTC](https://discuss.elastic.co/t/mapper-parsing-exception-even-after-installed-ingest-attachment-5-0-1/66335/2 "2016-11-17T07:16:01Z")

</div>

Please format your code using `</>` icon. It will make your post more readable.

Ingest does not provide a new type of field.  
Just follow the guide here [https://www.elastic.co/guide/en/elasticsearch/plugins/current/using-ingest-attachment.html](https://www.elastic.co/guide/en/elasticsearch/plugins/current/using-ingest-attachment.html)

---

<div class="post-metadata">

**Author:** ![radsan84](https://avatars.discourse-cdn.com/v4/letter/r/edb3f5/32.png) [@radsan84](https://discuss.elastic.co/u/radsan84)\
**Post date:** [November 17, 2016, 7:28am UTC](https://discuss.elastic.co/t/mapper-parsing-exception-even-after-installed-ingest-attachment-5-0-1/66335/3 "2016-11-17T07:28:01Z")

</div>

Thanks David, I will try the code as in that guide ..Before that , Could i please ask you , how do i get the base64 "string" that is being passed for the field 'data'.  
For instance, {  
"data": "e1xydGYxXGFuc2kNCkxvcmVtIGlwc3VtIGRvbG9yIHNpdCBhbWV0DQpccGFyIH0="  
}  
I am new to elastic search, Requesting your help please. I am trying to index pdf documents in elasticsearch

---

<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:** [November 17, 2016, 7:41am UTC](https://discuss.elastic.co/t/mapper-parsing-exception-even-after-installed-ingest-attachment-5-0-1/66335/4 "2016-11-17T07:41:07Z")

</div>

May be use something like: [http://www.motobit.com/util/base64-decoder-encoder.asp](http://www.motobit.com/util/base64-decoder-encoder.asp)

On Linux may be:

```auto
base64 yourfile.pdf

```

Also have a look at [https://github.com/dadoonet/fscrawler](https://github.com/dadoonet/fscrawler)

---

<div class="post-metadata">

**Author:** ![radsan84](https://avatars.discourse-cdn.com/v4/letter/r/edb3f5/32.png) [@radsan84](https://discuss.elastic.co/u/radsan84)\
**Post date:** [November 17, 2016, 10:18am UTC](https://discuss.elastic.co/t/mapper-parsing-exception-even-after-installed-ingest-attachment-5-0-1/66335/5 "2016-11-17T10:18:43Z")

</div>

Thanks again David .. I tried with the example given in [https://www.elastic.co/guide/en/elasticsearch/plugins/current/using-ingest-attachment.html](https://www.elastic.co/guide/en/elasticsearch/plugins/current/using-ingest-attachment.html)  
i created 'myindex2' wih pipeline attachment as shown below,  
_**curl -XGET '[http://10.242.104.46:9200/my\_index2/my\_type/my\_id?pretty](http://10.242.104.46:9200/my_index2/my_type/my_id?pretty)'**_  
{  
"\_index" : "my\_index2",  
"\_type" : "my\_type",  
"\_id" : "my\_id",  
"\_version" : 1,  
"found" : true,  
"\_source" : {  
"data" : "e1xydGYxXGFuc2kNCkxvcmVtIGlwc3VtIGRvbG9yIHNpdCBhbWV0DQpccGFyIH0=",  
"attachment" : {  
"content\_type" : "application/rtf",  
"language" : "ro",  
"content" : "Lorem ipsum dolor sit amet",  
"content\_length" : 28  
}  
}  
}

I tried to do search the content 'dolor' using below command,  
curl -XGET '[http://10.242.104.46:9200/my\_index2/](http://10.242.104.46:9200/my_index2/)_search?q=content:dolor'  
Output HIts is 0. Please correct if i am doing it wrong .._`emphasized text`\_

---

<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:** [December 15, 2016, 10:18am UTC](https://discuss.elastic.co/t/mapper-parsing-exception-even-after-installed-ingest-attachment-5-0-1/66335/6 "2016-12-15T10:18:46Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
