Mapper parsing exception even after installed ingest attachment 5.0.1

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
Then when i tried creating mapping, i got an error as shown below. Please help to resolve this,

curl -XPUT '' -d '{
"person": {
"properties": {
"file": {
"type": "attachment",
"path": "full",
"fields": {
"file": {
"type": "string",
"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}.

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

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

May be use something like:

On Linux may be:

base64 yourfile.pdf

Also have a look at

Thanks again David .. I tried with the example given in
i created 'myindex2' wih pipeline attachment as shown below,
curl -XGET ''
"_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 ''
Output HIts is 0. Please correct if i am doing it wrong ..
emphasized text_

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