# Solr copyfield analog in elastic

**URL:** <https://discuss.elastic.co/t/solr-copyfield-analog-in-elastic/34630>\
**Category:** Elasticsearch\
**Created:** [November 16, 2015, 12:11am UTC](https://discuss.elastic.co/t/solr-copyfield-analog-in-elastic/34630 "2015-11-16T00:11:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![eprst](https://avatars.discourse-cdn.com/v4/letter/e/a6a055/32.png) [@eprst](https://discuss.elastic.co/u/eprst)\
**Post date:** [November 16, 2015, 12:11am UTC](https://discuss.elastic.co/t/solr-copyfield-analog-in-elastic/34630/1 "2015-11-16T00:11:25Z")

</div>

we use solr before and now we start using elastic and in solr we used copyfields. it is easy way to add different analyzers for the same value and pass it only once when adding new document. what is the best way to do the same stuff in elastic?

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [November 16, 2015, 1:05am UTC](https://discuss.elastic.co/t/solr-copyfield-analog-in-elastic/34630/2 "2015-11-16T01:05:32Z")

</div>

Try

"title": { "type": "string", "fields": { "raw": { "type": "string",  
"index": "not\_analyzed" } } }

You can now query title and it'll use the default analyzer or title.raw and  
it'll skip analysis. You can make as many of these fields as you like.

---

<div class="post-metadata">

**Author:** ![eprst](https://avatars.discourse-cdn.com/v4/letter/e/a6a055/32.png) [@eprst](https://discuss.elastic.co/u/eprst)\
**Post date:** [November 16, 2015, 10:38am UTC](https://discuss.elastic.co/t/solr-copyfield-analog-in-elastic/34630/3 "2015-11-16T10:38:38Z")

</div>

thank u

---

<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:38pm UTC](https://discuss.elastic.co/t/solr-copyfield-analog-in-elastic/34630/4 "2017-07-05T23:38:14Z")

</div>


