首页 文章

为什么不能在ElasticSearch 6.0中启用“_ all”字段?

提问于
浏览
1

我创建索引"index"并输入"fulltext",但是当我尝试启用"_all"字段时(由https://www.elastic.co/guide/en/elasticsearch/reference/6.0/mapping-all-field.html建议):

curl -XPUT 'localhost:9200/index?pretty' -H 'Content-Type: application/json' -d'
{
  "mapping": {
    "fulltext": {
      "_all": {
        "enabled": true   
      }
    }
  }
}
'

我得到的信息如下:

{
  "error" : {
    "root_cause" : [
      {
        "type" : "illegal_argument_exception",
        "reason" : "unknown setting [index.mapping.fulltext._all.enabled] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
      }
    ],
    "type" : "illegal_argument_exception",
    "reason" : "unknown setting [index.mapping.fulltext._all.enabled] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
  },
  "status" : 400
}

我该如何纠正?谢谢 .

1 回答

  • 0

    您无法在6.0中更改它 . 基本上该字段不再存在,但该功能仍然存在,但实现方式不同 . 所以你不再需要关心它了 .

    这就是您链接到的第一行文档所说的内容:

    _all可能不再为在6.0中创建的索引启用,使用自定义字段和映射copy_to参数

相关问题