我们使用copy_to (自定义_all)进行elasticsearch映射。它只用于查询,不存储。我们使用“分析器”:“德语”来分析原始的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
},
...发布于 2017-04-07 08:35:55
是的,您必须像官方文档所提到的那样分别分析复制的字段。
这并不意味着重新分析,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定义映射。
谢谢
https://stackoverflow.com/questions/43271824
复制相似问题