54fddac93f
The default mustache template that is supported by elasticsearch doesn't support array/list access. This poses a real limitation for watcher as with `search` input, the hits are returned as an array/list. To bypass this limitation, an extra (tedious) step is required in order to transform the hits to a data structure that is supported by mustache. This commit adds a new mustache script engine - `xmustache` to elasticsearch that supports array/list access in the form of `array.X` where `X` is the index into the array/list. This enables accessing the search results without using a transform. The following example will fetch the `"key"` field of the 3rd hit in the search result: `ctx.payload.hits.hits.3._source.key`. This array/list support will be added to elasticsearch, but it'll only be available in later versions. For now, the default template in watcher will therefore be `xmustache`. Added docs for templates Fixes elastic/elasticsearch#230 Original commit: elastic/x-pack-elasticsearch@b09cad7f8b |
||
---|---|---|
dev-tools | ||
rest-api-spec | ||
src | ||
LICENSE.txt | ||
README.asciidoc | ||
all-signatures.txt | ||
core-signatures.txt | ||
pom.xml | ||
test-signatures.txt | ||
tests.policy |
README.asciidoc
= Elasticsearch Alerts Plugin This plugins adds alerting features to elasticsearch You can build the plugin with `mvn package`. The documentation is put in the `docs/` directory.