gpt4 book ai didi

elasticsearch - Elasticsearch:禁用索引编制,但将copy_to应用于字段

转载 作者:行者123 更新时间:2023-12-02 22:55:16 24 4
gpt4 key购买 nike

我正在尝试将字段仅用于复制目的,而不是使用下面的映射对其进行索引

        "Line2": {
"type": "text",
"copy_to": "AllFields" ,
"enabled": false
}

但是得到异常(exception)

{"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"Mapping definition for [Line2] has unsupported parameters: [enabled : false]"}],"type":"mapper_parsing_exception","reason":"Failed to parse mapping [_doc]: Mapping definition for [Line2] has unsupported parameters: [enabled : false]","caused_by":{"type":"mapper_parsing_exception","reason":"Mapping definition for [Line2] has unsupported parameters: [enabled : false]"}},"status":400}



能做到吗?

ES版本:6.7

最佳答案

如果您不想索引(使之可搜索)一个字段,请对该字段使用"index": false

"Line2": {
"type": "text",
"copy_to": "AllFields",
"index": false
}

关于elasticsearch - Elasticsearch:禁用索引编制,但将copy_to应用于字段,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57122275/

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