Skip to content

Commit ae69472

Browse files
bhavyaidrjdconrad
authored andcommitted
Updated painless-walkthrough documentation (#65530)
Update documentation about regex note.
1 parent 8dc71c3 commit ae69472

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

docs/painless/painless-guide/painless-walkthrough.asciidoc

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -206,14 +206,13 @@ GET hockey/_search
206206
[[modules-scripting-painless-regex]]
207207
==== Regular expressions
208208

209-
NOTE: Regexes are disabled by default because they circumvent Painless's
210-
protection against long running and memory hungry scripts. To make matters
211-
worse even innocuous looking regexes can have staggering performance and stack
212-
depth behavior. They remain an amazing powerful tool but are too scary to enable
213-
by default. To enable them yourself set `script.painless.regex.enabled: true` in
214-
`elasticsearch.yml`. We'd like very much to have a safe alternative
215-
implementation that can be enabled by default so check this space for later
216-
developments!
209+
NOTE: Regexes are enabled by default as the Setting `script.painless.regex.enabled`
210+
has a new option, `limited`, the default. This defaults to using regular expressions
211+
but limiting the complexity of the regular expressions. Innocuous looking regexes
212+
can have staggering performance and stack depth behavior. But still, they remain an
213+
amazingly powerful tool. In addition, to `limited`, the setting can be set to `true`,
214+
as before, which enables regular expressions without limiting them.To enable them
215+
yourself set `script.painless.regex.enabled: true` in `elasticsearch.yml`.
217216

218217
Painless's native support for regular expressions has syntax constructs:
219218

0 commit comments

Comments
 (0)