# No handler for type \[attachment\] declared on field \[content\]

**URL:** <https://discuss.elastic.co/t/no-handler-for-type-attachment-declared-on-field-content/117375>\
**Category:** Elasticsearch\
**Created:** [January 28, 2018, 4:27pm UTC](https://discuss.elastic.co/t/no-handler-for-type-attachment-declared-on-field-content/117375 "2018-01-28T16:27:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Royner\_Valerio\_Valve](https://avatars.discourse-cdn.com/v4/letter/r/7cd45c/32.png) [@Royner\_Valerio\_Valve](https://discuss.elastic.co/u/Royner_Valerio_Valve)\
**Post date:** [January 28, 2018, 4:27pm UTC](https://discuss.elastic.co/t/no-handler-for-type-attachment-declared-on-field-content/117375/1 "2018-01-28T16:27:47Z")

</div>

I was working with ingest attachment but when I delete current index because I wanted to regenerate my index but I'm getting this error:  
{  
"error": {  
"root\_cause": [  
{  
"type": "mapper\_parsing\_exception",  
"reason": "No handler for type [attachment] declared on field [content]"  
}  
],  
"type": "mapper\_parsing\_exception",  
"reason": "Failed to parse mapping [actas]: No handler for type [attachment] declared on field [content]",  
"caused\_by": {  
"type": "mapper\_parsing\_exception",  
"reason": "No handler for type [attachment] declared on field [content]"  
}  
},  
"status": 400  
}

I'm using this request/configuration and kinaba:

```
PUT /documentos
{
  "settings": {
"analysis": {
  "analyzer": {
    "windows_path_hierarchy_analyzer": {
      "tokenizer": "windows_path_hierarchy_tokenizer"
    }
  },
  "tokenizer": {
    "windows_path_hierarchy_tokenizer": {
      "type": "path_hierarchy",
      "delimiter": "\\"
    }
  }
}
  },
  "mappings": {
  "actas": {
    "properties": {
      "author": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "content": {
        "type": "attachment"
      },
      "content_type": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "id": {
        "type": "long"
      },
      "title": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      }
    }
  }
}
  }
```

---

<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:** [January 28, 2018, 5:57pm UTC](https://discuss.elastic.co/t/no-handler-for-type-attachment-declared-on-field-content/117375/2 "2018-01-28T17:57:39Z")

</div>

Read the documentation about ingest attachment. Nowhere there is a mention in it about a type `attachment` that you put on `content` field. Content must be most likely a `text` field.

---

<div class="post-metadata">

**Author:** ![Royner\_Valerio\_Valve](https://avatars.discourse-cdn.com/v4/letter/r/7cd45c/32.png) [@Royner\_Valerio\_Valve](https://discuss.elastic.co/u/Royner_Valerio_Valve)\
**Post date:** [January 28, 2018, 6:15pm UTC](https://discuss.elastic.co/t/no-handler-for-type-attachment-declared-on-field-content/117375/3 "2018-01-28T18:15:39Z")

</div>

> [@dadoonet](#):
>
> text

Thanks , It solved the issue.

---

<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:** [February 25, 2018, 6:15pm UTC](https://discuss.elastic.co/t/no-handler-for-type-attachment-declared-on-field-content/117375/4 "2018-02-25T18:15:52Z")

</div>

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