# How and where I can set "doc\_values": true

**URL:** https://discuss.elastic.co/t/how-and-where-i-can-set-doc-values-true/1023
**Category:** Elasticsearch
**Created:** [May 20, 2015, 7:03pm UTC](https://discuss.elastic.co/t/how-and-where-i-can-set-doc-values-true/1023 "2015-05-20T19:03:19Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![vikas\_gopal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_gopal/32/47661_2.png) [@vikas\_gopal](https://discuss.elastic.co/u/vikas_gopal)
#### Post date: [May 20, 2015, 7:03pm UTC](https://discuss.elastic.co/t/how-and-where-i-can-set-doc-values-true/1023/1 "2015-05-20T19:03:19Z")

</div>

Hi Experts,

I read "[https://www.elastic.co/guide/en/elasticsearch/guide/current/doc-values.html](https://www.elastic.co/guide/en/elasticsearch/guide/current/doc-values.html)" and got to know that we can set doc\_value to true. Even a code has been mentioned in this link. Since I am new to ELK so my question is where I need to place this code or where I need to mention "doc\_values": true. Do I need to mention it in a file or something if yes then what is the name of that file .

Please suggest

---

<div class="post-metadata">

### Author: ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)
#### Post date: [May 20, 2015, 9:27pm UTC](https://discuss.elastic.co/t/how-and-where-i-can-set-doc-values-true/1023/2 "2015-05-20T21:27:43Z")

</div>

Hi,

You can find some explanations and examples about doc values at [https://www.elastic.co/guide/en/elasticsearch/guide/master/doc-values.html](https://www.elastic.co/guide/en/elasticsearch/guide/master/doc-values.html)

---

<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: [May 20, 2015, 10:42pm UTC](https://discuss.elastic.co/t/how-and-where-i-can-set-doc-values-true/1023/3 "2015-05-20T22:42:39Z")

</div>

You set field data in the mapping of a field.

Using the code in the docs you can run that in Sense, or use curl, to send it to Elasticsearch.

---

<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:12am UTC](https://discuss.elastic.co/t/how-and-where-i-can-set-doc-values-true/1023/4 "2017-07-06T00:12:52Z")

</div>


