# Change default \[max\_docvalue\_fields\_search\] value

**URL:** <https://discuss.elastic.co/t/change-default-max-docvalue-fields-search-value/230525>\
**Category:** Elasticsearch\
**Created:** [April 30, 2020, 11:16am UTC](https://discuss.elastic.co/t/change-default-max-docvalue-fields-search-value/230525 "2020-04-30T11:16:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![WAFA\_Mardiney](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wafa_mardiney/32/65461_2.png) [@WAFA\_Mardiney](https://discuss.elastic.co/u/WAFA_Mardiney)\
**Post date:** [April 30, 2020, 11:16am UTC](https://discuss.elastic.co/t/change-default-max-docvalue-fields-search-value/230525/1 "2020-04-30T11:16:52Z")

</div>

I'm using kibana and was encountering an issue that was solved by setting the [max\_docvalue\_fields\_search] setting to a greater value like this:

```auto
PUT /index_name_log-*/_settings
{
	"index.max_docvalue_fields_search" : "10000000"
}

```

The problem is this works only for previously created indexes and since I'm creating index for each day I have to change this each day, is there a way to change the default max\_docvalue\_fields\_search for newly created indexes? I don't think it would be a good idea to do this each time even if it is automated.

---

<div class="post-metadata">

**Author:** ![WAFA\_Mardiney](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wafa_mardiney/32/65461_2.png) [@WAFA\_Mardiney](https://discuss.elastic.co/u/WAFA_Mardiney)\
**Post date:** [May 4, 2020, 1:34pm UTC](https://discuss.elastic.co/t/change-default-max-docvalue-fields-search-value/230525/2 "2020-05-04T13:34:39Z")

</div>

I found the solution, for anyone still suffering from this you can use 'index templates'  
check this link:  
[https://www.elastic.co/guide/en/elasticsearch/reference/6.0/indices-templates.html](https://www.elastic.co/guide/en/elasticsearch/reference/6.0/indices-templates.html)

---

<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:** [June 1, 2020, 1:34pm UTC](https://discuss.elastic.co/t/change-default-max-docvalue-fields-search-value/230525/3 "2020-06-01T13:34:39Z")

</div>

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