Copy_to an dynamic or customised field

How to configure copy_to from one dynamic template to another dynamic
template.

Here is a sample Config: -

"dynamic_templates": [{
"template_entity_name_": {
"match": "entity_name_*",
"match_mapping_type": "string",
"mapping": {
"type": "text",
"store": true,
"index": false,
"norms": false,
"index_options": "docs",
"copy_to": ["nameStartsWith", "wordOfNameStartsWith", "all_names",
"all_search_fields_*",
"all_search_fields", "wordOfNameStartsWith_*",
"trigrams_search_fields_*",
"whole_short_name", "whole_word" ]
}
}
}

if we try to index entity_name_en_US it should copy to
all_search_fields_en_US and if we try for entity_name_en_GB then it should
copy to all_search_fields_en_GB.. but its not working..

How can we solve this problem ?

3 Likes

Hi
Even I have faced the same issue.. When we were working with solr we could do something like this

<copyField source="name_*" dest="all_search_fields_* />

But could not find an equivalent in Elasticsearch.

2 Likes

I am also facing same issue. Please let me know if you find the resolution.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.