# How to set two analyzer for a field

**URL:** <https://discuss.elastic.co/t/how-to-set-two-analyzer-for-a-field/152343>\
**Category:** Elasticsearch\
**Created:** [October 13, 2018, 1:38pm UTC](https://discuss.elastic.co/t/how-to-set-two-analyzer-for-a-field/152343 "2018-10-13T13:38:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mhsankar](https://avatars.discourse-cdn.com/v4/letter/m/bbe5ce/32.png) [@mhsankar](https://discuss.elastic.co/u/mhsankar)\
**Post date:** [October 13, 2018, 1:38pm UTC](https://discuss.elastic.co/t/how-to-set-two-analyzer-for-a-field/152343/1 "2018-10-13T13:38:10Z")

</div>

hi  
i have two analyzer.  
how i can set this two analyzer into a fields?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [October 13, 2018, 3:04pm UTC](https://discuss.elastic.co/t/how-to-set-two-analyzer-for-a-field/152343/2 "2018-10-13T15:04:20Z")

</div>

You need to define a subfield which will be generated at index time. In this other field you can define another analyzer.

Search for multi fields in documentation.

---

<div class="post-metadata">

**Author:** ![mhsankar](https://avatars.discourse-cdn.com/v4/letter/m/bbe5ce/32.png) [@mhsankar](https://discuss.elastic.co/u/mhsankar)\
**Post date:** [October 14, 2018, 11:40am UTC](https://discuss.elastic.co/t/how-to-set-two-analyzer-for-a-field/152343/3 "2018-10-14T11:40:25Z")

</div>

thanks  
i solve it by subfields

---

<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:** [November 11, 2018, 11:40am UTC](https://discuss.elastic.co/t/how-to-set-two-analyzer-for-a-field/152343/4 "2018-11-11T11:40:26Z")

</div>

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