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

时间:2017-12-14 19:46:03

标签: elasticsearch aws-elasticsearch

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

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

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

1 个答案:

答案 0 :(得分:4)

我遇到了同样的问题。根本原因是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现在提供了功能