# Script.painless.regex.enabled: true Is not enough to disable limits

**URL:** <https://discuss.elastic.co/t/script-painless-regex-enabled-true-is-not-enough-to-disable-limits/353153>\
**Category:** Elasticsearch\
**Tags:** painless\
**Created:** [February 13, 2024, 10:49am UTC](https://discuss.elastic.co/t/script-painless-regex-enabled-true-is-not-enough-to-disable-limits/353153 "2024-02-13T10:49:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Saief](https://avatars.discourse-cdn.com/v4/letter/s/a587f6/32.png) [@Saief](https://discuss.elastic.co/u/Saief)\
**Post date:** [February 13, 2024, 10:49am UTC](https://discuss.elastic.co/t/script-painless-regex-enabled-true-is-not-enough-to-disable-limits/353153/1 "2024-02-13T10:49:42Z")

</div>

Hello,

ES vesion : 8.12.0  
I want to use scripting when search documents.  
I activated "script.painless.regex.enabled: true" in purpose to avoid limiting chars, But in my cluster settings, I still see :

`"painless":{"regex":{"enabled":"true","limit-factor":"6"}}`

I dont know why "limit-factor" exists and setted to 6 by default, knowing that setting the first property to true will automatically avoid char limitations ( thats what official doc is saying ).

Dos anyone have an explanation please ? and may be a solution to set unlimited char for regex expression in scripting.

Thank you,

---

<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:** [March 12, 2024, 10:50am UTC](https://discuss.elastic.co/t/script-painless-regex-enabled-true-is-not-enough-to-disable-limits/353153/2 "2024-03-12T10:50:34Z")

</div>

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