有人能告訴我,如果在ElasticSearch上有相當於Solr copyField指令嗎?ElasticSarch上Solr的copyField的等價物?
我知道有多字段類型: http://www.elasticsearch.org/guide/reference/mapping/multi-field-type.html 當你想在同一個字段上應用多個分析器時,這很好。
但它不完全一樣。 Solr的許可證「合併」多個字段爲一個:
<field name="id" type="string" indexed="true" stored="true"/>
<field name="name" type="string" indexed="true" stored="true"/>
<field name="subject" type="string" indexed="true" stored="true"/>
<field name="location" type="string" indexed="true" stored="true"/>
<field name="all" type="text" indexed="true" stored="true" multiValued="true"/>
<copyField source="*" dest="all"/>
這個插件是非常有前途的: https://github.com/yakaz/elasticsearch-analysis-combo
,因爲它允許使用ElasticSearch時取回結果爲單場多值字段。 但它仍然不完全相同,因爲它不允許「合併」多個字段。我想組合分析儀和Solr copyField的組合。
我有一個博客文章模型(標題/說明字段),並希望在一個字段「blogContent」上覆制標題和說明,我將在其上應用2個不同的分析器。
ElasticSearch中是否有解決方案?
我知道_all但是如果需要能夠創建許多不同的_all –
我同意這將是一個很好的功能。不幸的是,它還沒有實現https://github.com/elasticsearch/elasticsearch/issues/1169 – imotov