2017-04-07 9 views
1

我們有一個使用copy_to(自定義_all)的elasticsearch映射。它僅用於查詢,不存儲。我們使用「分析器」分析原始file_content_de:「德語」。我們是否還需要分析copy_to,ES文檔對此並不十分清楚?如果原始內容已被分析,是否有必要重新分析elasticsearch copy_to?

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 
    }, 
    ... 

回答

1

是你必須seperately分析複製的字段作爲官方單證提及。

,這並不意味着重新分析,該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與您合適的分析儀。

謝謝