gpt4 book ai didi

elasticsearch - 为什么不能在ElasticSearch 6.0中启用 “_all”字段?

转载 作者:行者123 更新时间:2023-12-02 22:57:26 25 4
gpt4 key购买 nike

我有索引“index”并输入了“fulltext”,但是当我尝试通过https://www.elastic.co/guide/en/elasticsearch/reference/6.0/mapping-all-field.html建议启用“_all”字段时:

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
}

我该如何纠正?谢谢。

最佳答案

您无法在6.0中进行更改。
基本上,该字段不再存在,但是功能仍然存在,但是实现方式有所不同。因此,您不再需要关心它。

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

_all may no longer be enabled for indices created in 6.0+, use a custom field and the mapping copy_to parameter

关于elasticsearch - 为什么不能在ElasticSearch 6.0中启用 “_all”字段?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47690487/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com