浏览代码

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 年之前
父节点
当前提交
0bf3cae034
共有 1 个文件被更改,包括 8 次插入6 次删除
  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>
     }
   ]
 }