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

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
          }
        }
      }
    }
  }
}
  }

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.

Thanks , It solved the issue.

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