elasticsearch/docs/reference/modules/scripting
Nik Everett 8d3ef742db Painless: =~ and ==~ operators
Adds support for the find operator (=~) and the match operator (==~)
to painless's regexes. Also whitelists most of the Matcher class and
documents regex support in painless.

The find operator (=~) returns a boolean that is the result of building
a matcher on the lhs with the Pattern on the RHS and calling `find` on
it. Use it like this:

```
if (ctx._source.last =~ /b/)
```

The match operator (==~) returns boolean like find but instead of calling
`find` on the Matcher it calls `matches`.

```
if (ctx._source.last ==~ /[^aeiou].*[aeiou]/)
```

Finally, if you want the actual matcher you do:

```
Matcher m = /[aeiou]/.matcher(ctx._source.last)
```
2016-06-16 08:42:33 -04:00
..
advanced-scripting.asciidoc Reorganise scripting docs (#18132) 2016-05-04 18:17:10 +02:00
expression.asciidoc improve date api for expressions/painless fields 2016-05-31 09:32:33 -04:00
fields.asciidoc Renamed all AUTOSENSE snippets to CONSOLE (#18210) 2016-05-09 15:42:23 +02:00
groovy.asciidoc Remove support for mulitple languages per scripting engine 2016-05-13 09:24:31 -06:00
native.asciidoc Remove LeafSearchScript.runAsFloat(): Nothing calls it. 2016-05-15 22:59:28 -04:00
painless.asciidoc Painless: =~ and ==~ operators 2016-06-16 08:42:33 -04:00
security.asciidoc Docs: Replace [source,json] with [source,js] 2016-05-24 11:17:27 -04:00
using.asciidoc new ScriptProcessor for Ingest (#18193) 2016-06-15 14:57:18 -07:00