没有在字段上声明的类型 [join] 的处理程序

No handler for type [join] declared on field

我尝试在新的 AWS Elasticsearch 6.0 上使用连接数据类型创建索引。

Elasticsearch 6.0 文档中的以下说明:https://www.elastic.co/guide/en/elasticsearch/reference/6.0/parent-join.html

PUT my_index
{
  "mappings": {
    "doc": {
      "properties": {
        "my_join_field": { 
          "type": "join",
          "relations": {
            "question": "answer" 
          }
        }
      }
    }
  }
}

然后我收到以下错误:

{
  "error": {
    "root_cause": [
      {
        "type": "mapper_parsing_exception",
        "reason": "No handler for type [join] declared on field [my_join_field]"
      }
    ],
    "type": "mapper_parsing_exception",
    "reason": "Failed to parse mapping [doc]: No handler for type [join] declared on field [my_join_field]",
    "caused_by": {
      "type": "mapper_parsing_exception",
      "reason": "No handler for type [join] declared on field [my_join_field]"
    }
  },
  "status": 400
}

我想知道我是否遗漏了什么?谢谢!

我遇到了同样的问题。根本原因是 AWS 打包的 ElasticSearch 服务缺少模块。 如果您将本地安装的配置与 AWS 提供的配置进行比较,您会发现缺少此模块:

{
      "name" : "parent-join",
      "version" : "6.0.0",
      "description" : "This module adds the support parent-child queries and aggregations",
      "classname" : "org.elasticsearch.join.ParentJoinPlugin",
      "has_native_controller" : false,
      "requires_keystore" : false
}

功能现已在 AWS ES 6.0 中可用