# Doc\_values doesn't effect date field?

**URL:** <https://discuss.elastic.co/t/doc-values-doesnt-effect-date-field/25382>\
**Category:** Elasticsearch\
**Created:** [July 12, 2015, 9:53am UTC](https://discuss.elastic.co/t/doc-values-doesnt-effect-date-field/25382 "2015-07-12T09:53:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![raz](https://avatars.discourse-cdn.com/v4/letter/r/9f8e36/32.png) [@raz](https://discuss.elastic.co/u/raz)\
**Post date:** [July 12, 2015, 9:53am UTC](https://discuss.elastic.co/t/doc-values-doesnt-effect-date-field/25382/1 "2015-07-12T09:53:51Z")

</div>

I defined date field as doc\_values in the template like that:

"createDate":{  
"type":"date","doc\_values":true,"fielddata":{"format":"doc\_values"}  
}

but when I run this command:

[http://my.server.com:9200/\_stats/fielddata?level=indices&fields=\*&pretty](http://my.server.com:9200/_stats/fielddata?level=indices&fields=*&pretty)

I can still see the field data hold values:

"createDate" : {  
"memory\_size\_in\_bytes" : 8942084  
}

Any idea why this can happen ?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 12, 2015, 10:04am UTC](https://discuss.elastic.co/t/doc-values-doesnt-effect-date-field/25382/2 "2015-07-12T10:04:12Z")

</div>

It seems you're defining doc\_values twice, why is that?

Also they only apply to fields that are not analysed, which you haven't specified.

---

<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:02am UTC](https://discuss.elastic.co/t/doc-values-doesnt-effect-date-field/25382/3 "2017-07-06T00:02:06Z")

</div>


