mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 17:34:17 -04:00
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) ``` |
||
---|---|---|
.. | ||
cluster | ||
discovery | ||
indices | ||
scripting | ||
cluster.asciidoc | ||
discovery.asciidoc | ||
gateway.asciidoc | ||
http.asciidoc | ||
indices.asciidoc | ||
memcached.asciidoc | ||
network.asciidoc | ||
node.asciidoc | ||
plugins.asciidoc | ||
scripting.asciidoc | ||
snapshots.asciidoc | ||
threadpool.asciidoc | ||
thrift.asciidoc | ||
transport.asciidoc | ||
tribe.asciidoc |