gpt4 book ai didi

elasticsearch - 如果已分析原始内容,是否有必要重新分析elasticsearch copy_to?

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

我们有一个使用copy_to(自定义_all)的elasticsearch映射。它仅用于查询,不存储。我们使用“analyzer”:“german”分析原始的file_content_de。我们是否还需要分析copy_to,ES文档对此并不十分清楚?

ES文档: https://www.elastic.co/guide/en/elasticsearch/guide/2.x/custom-all.html

    "attachment_contents_de": {
"type": "string"
},
...
"file_content_de": {
"type": "string",
"analyzer": "german",
"copy_to": "attachment_contents_de",
"include_in_all": false,
"store":true
},
...

最佳答案

是的,您必须按照官方文档中的说明分别分析复制的字段。

这并不意味着重新分析,copy_to将字符串值复制到该字段,该字段本身应具有自己的定义以及已定义的分析器

Mappings of the first_name and last_name fields have no bearing on how the full_name field is indexed. The full_name field copies the string values from the other two fields, then indexes them according to the mapping of the full_name field only.

您可以使用适当的分析器为 attachment_contents_de定义映射。

谢谢

关于elasticsearch - 如果已分析原始内容,是否有必要重新分析elasticsearch copy_to?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43271824/

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