# Is there an equivalent of a copyfield in Elasticsearch

**URL:** <https://discuss.elastic.co/t/is-there-an-equivalent-of-a-copyfield-in-elasticsearch/5251>\
**Category:** Elasticsearch\
**Created:** [August 25, 2011, 5:32pm UTC](https://discuss.elastic.co/t/is-there-an-equivalent-of-a-copyfield-in-elasticsearch/5251 "2011-08-25T17:32:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![poohneat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/poohneat/32/3132_2.png) [@poohneat](https://discuss.elastic.co/u/poohneat)\
**Post date:** [August 25, 2011, 5:32pm UTC](https://discuss.elastic.co/t/is-there-an-equivalent-of-a-copyfield-in-elasticsearch/5251/1 "2011-08-25T17:32:28Z")

</div>

Solr has this feature, [http://wiki.apache.org/solr/SchemaXml#Copy\_Fields](http://wiki.apache.org/solr/SchemaXml#Copy_Fields), which allows you to index a few fields together as one field. Is there an equivalent of that in ES. I need this to index a few differently named fields together as one field.

---

<div class="post-metadata">

**Author:** ![jelmer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jelmer/32/3550_2.png) [@jelmer](https://discuss.elastic.co/u/jelmer)\
**Post date:** [September 3, 2015, 7:20am UTC](https://discuss.elastic.co/t/is-there-an-equivalent-of-a-copyfield-in-elasticsearch/5251/2 "2015-09-03T07:20:24Z")

</div>

I believe you can use copy\_to for this

[https://www.elastic.co/guide/en/elasticsearch/guide/current/custom-all.html](https://www.elastic.co/guide/en/elasticsearch/guide/current/custom-all.html)

---

<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 5, 2017, 11:52pm UTC](https://discuss.elastic.co/t/is-there-an-equivalent-of-a-copyfield-in-elasticsearch/5251/3 "2017-07-05T23:52:23Z")

</div>


