# Why do I have term x and term x.raw, for my date fields?

**URL:** <https://discuss.elastic.co/t/why-do-i-have-term-x-and-term-x-raw-for-my-date-fields/101809>\
**Category:** Elasticsearch\
**Created:** [September 26, 2017, 9:14am UTC](https://discuss.elastic.co/t/why-do-i-have-term-x-and-term-x-raw-for-my-date-fields/101809 "2017-09-26T09:14:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomer](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@tomer](https://discuss.elastic.co/u/tomer)\
**Post date:** [September 26, 2017, 9:14am UTC](https://discuss.elastic.co/t/why-do-i-have-term-x-and-term-x-raw-for-my-date-fields/101809/1 "2017-09-26T09:14:39Z")

</div>

Hi, I have for my date fields the date in .raw format and the same field duplicated without.raw ending but as a String value.

Why is this?

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [September 26, 2017, 11:17pm UTC](https://discuss.elastic.co/t/why-do-i-have-term-x-and-term-x-raw-for-my-date-fields/101809/2 "2017-09-26T23:17:52Z")

</div>

The most likely reason is you are using logstash (or some other loader) that added an index template to elasticsearch. According to this template, any unknown string field will be indexed twice - one time as an analyzed field (`x`) and as not analyzed fields (`x.raw`). The analyzed version allows performing full text search and not analyzed version is needed for exact matches and aggregations (See ["Exact values versus full text"](https://www.elastic.co/guide/en/elasticsearch/guide/current/_exact_values_versus_full_text.html) section of the guide for more informaiton). Since logstash doesn't know how you are planning to use a new fields, in indices it both ways just in case.

---

<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:** [October 24, 2017, 11:17pm UTC](https://discuss.elastic.co/t/why-do-i-have-term-x-and-term-x-raw-for-my-date-fields/101809/3 "2017-10-24T23:17:53Z")

</div>

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