# Modify cluster settings in ESIntegTestCase

**URL:** <https://discuss.elastic.co/t/modify-cluster-settings-in-esintegtestcase/89737>\
**Category:** Elasticsearch\
**Created:** [June 16, 2017, 3:32pm UTC](https://discuss.elastic.co/t/modify-cluster-settings-in-esintegtestcase/89737 "2017-06-16T15:32:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![xam](https://avatars.discourse-cdn.com/v4/letter/x/bb73d2/32.png) [@xam](https://discuss.elastic.co/u/xam)\
**Post date:** [June 16, 2017, 3:32pm UTC](https://discuss.elastic.co/t/modify-cluster-settings-in-esintegtestcase/89737/1 "2017-06-16T15:32:33Z")

</div>

Hi all,

I use ESIntegTestCase to perform some test case and want to activate the script.painless.regex.enabled option as a prerequisite of my test.  
Unfortunately, this settings cannot be changed via the cluster admin api in Java.  
Is there another way to change this settings?

Thank you

---

<div class="post-metadata">

**Author:** ![xam](https://avatars.discourse-cdn.com/v4/letter/x/bb73d2/32.png) [@xam](https://discuss.elastic.co/u/xam)\
**Post date:** [June 19, 2017, 11:55am UTC](https://discuss.elastic.co/t/modify-cluster-settings-in-esintegtestcase/89737/2 "2017-06-19T11:55:45Z")

</div>

Hi all,

It seems that overriding the nodeSettings method did the job:

> @Override  
> protected Settings nodeSettings(int nodeOrdinal) {  
> Settings settings = super.nodeSettings(nodeOrdinal);  
> Settings.Builder builder = Settings.builder();  
> builder.put(settings);  
> builder.put("script.painless.regex.enabled", "true");  
> return builder.build();  
> }

---

<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 17, 2017, 11:56am UTC](https://discuss.elastic.co/t/modify-cluster-settings-in-esintegtestcase/89737/3 "2017-07-17T11:56:02Z")

</div>

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