Updated painless-walkthrough documentation (#65530)

Update documentation about regex note.
This commit is contained in:
Bhavya Gupta 2020-12-02 22:53:12 +05:30 committed by GitHub
parent ff368304a5
commit dcff07f717
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 8 deletions

View File

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