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