【问题标题】:Getting error action_request_validation_exception while mapping new field in already exist Elasticsearch index在已存在的 Elasticsearch 索引中映射新字段时出现错误 action_request_validation_exception
【发布时间】:2021-01-11 11:46:48
【问题描述】:

我正在尝试向我已经存在的 Elasticsearch 索引中添加一个新字段,但出现以下异常:

{
  "type": "action_request_validation_exception",
  "reason": "Validation Failed: 1: mapping type is missing;"
}

我正在使用以下 API

PUT order/_mapping
{
  "properties": {
    "title":  { "type": "text"}
  }
}

【问题讨论】:

  • 你用的是哪个版本的elasticsearch?
  • Elasticsearch 版本 6.4.2

标签: elasticsearch


【解决方案1】:

需要在PUT请求中添加映射类型,并将请求修改为:

PUT order/{{mapping-type}}/_mapping
{
  "properties": {
    "title":  { "type": "text"}
  }
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-11-24
    • 2020-01-13
    • 1970-01-01
    • 2019-04-16
    • 1970-01-01
    • 1970-01-01
    • 2012-02-20
    • 1970-01-01
    相关资源
    最近更新 更多