# If copy\_to is used to combine multiple string fields, should it concatenate them together?

**URL:** <https://discuss.elastic.co/t/if-copy-to-is-used-to-combine-multiple-string-fields-should-it-concatenate-them-together/1785>\
**Category:** Elasticsearch\
**Created:** [June 2, 2015, 9:59pm UTC](https://discuss.elastic.co/t/if-copy-to-is-used-to-combine-multiple-string-fields-should-it-concatenate-them-together/1785 "2015-06-02T21:59:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Derek\_Willms](https://avatars.discourse-cdn.com/v4/letter/d/e47c2d/32.png) [@Derek\_Willms](https://discuss.elastic.co/u/Derek_Willms)\
**Post date:** [June 2, 2015, 9:59pm UTC](https://discuss.elastic.co/t/if-copy-to-is-used-to-combine-multiple-string-fields-should-it-concatenate-them-together/1785/1 "2015-06-02T21:59:46Z")

</div>

I want to combine "make" and "model" fields for a vehicle. For example, I would like "Nissan" and "Ultima" become "Nissan Ultima".

When I use copy\_to to create a make\_model field at index time, it is pushing the contents into an array instead of concatenating the strings together. It looks like this:  
"make\_model.label": [  
"Nissan",  
"Altima"  
]

Is this the expected behavior? Is there a better way to accomplish this other than generating this field manually ahead of time?

Also, is there a way to enforce the order that copy\_to performs? I noticed that it seems to respect the json that I provide it with over the order that it is defined in the mapping.

Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 12:10am UTC](https://discuss.elastic.co/t/if-copy-to-is-used-to-combine-multiple-string-fields-should-it-concatenate-them-together/1785/2 "2017-07-06T00:10:05Z")

</div>


