Browse Source

Adding request element under search and correcting error_count (#82494)

We are missing the `request` element under chaing and `error_count` needs to be enclosed by single quotes
Imma Valls 3 years ago
parent
commit
0bf3cae034
1 changed files with 8 additions and 6 deletions
  1. 8 6
      x-pack/docs/en/watcher/transform/chain.asciidoc

+ 8 - 6
x-pack/docs/en/watcher/transform/chain.asciidoc

@@ -23,17 +23,19 @@ the other available transforms. For example, you can combine a
   "chain" : [ <1>
     {
       "search" : {  <2>
-        "indices" : [ "logstash-*" ],
-        "body" : {
-          "size" : 0,
-          "query" : {
-            "match" : { "priority" : "error" }
+        "request": {
+          "indices" : [ "logstash-*" ],
+          "body" : {
+            "size" : 0,
+            "query" : {
+              "match" : { "priority" : "error" }
+            }
           }
         }
       }
     },
     {
-      "script" : "return [ error_count : ctx.payload.hits.total ]"  <3>
+      "script" : "return [ 'error_count' : ctx.payload.hits.total ]"  <3>
     }
   ]
 }