|
@@ -37,8 +37,9 @@ PUT /_enrich/policy/my-policy
|
|
|
|
|
|
[source,console]
|
|
|
--------------------------------------------------
|
|
|
-PUT /_enrich/policy/my-policy/_execute
|
|
|
+PUT /_enrich/policy/my-policy/_execute?wait_for_completion=false
|
|
|
--------------------------------------------------
|
|
|
+// TEST[s/\?wait_for_completion=false//]
|
|
|
|
|
|
////
|
|
|
[source,console]
|
|
@@ -93,8 +94,13 @@ The previous enrich index will deleted with a delayed maintenance job.
|
|
|
By default this is done every 15 minutes.
|
|
|
// end::update-enrich-index[]
|
|
|
|
|
|
-Because this API request performs several operations,
|
|
|
-it may take a while to return a response.
|
|
|
+By default, this API is synchronous: It returns when a policy has been executed.
|
|
|
+Because executing a policy performs several operations, it may take a while to
|
|
|
+return a response, especially when the source indices are large. This can lead
|
|
|
+to timeouts. To prevent timeouts, set the `wait_for_completion` parameter to
|
|
|
+`false`. This runs the request asynchronously in the background, and returns a
|
|
|
+task ID. You can use the task ID to manage the request with the <<tasks,task
|
|
|
+management API>>.
|
|
|
|
|
|
[[execute-enrich-policy-api-path-params]]
|
|
|
==== {api-path-parms-title}
|
|
@@ -107,6 +113,7 @@ Enrich policy to execute.
|
|
|
==== {api-query-parms-title}
|
|
|
|
|
|
`wait_for_completion`::
|
|
|
-(Required, Boolean)
|
|
|
-If `true`, the request blocks other enrich policy execution requests until
|
|
|
-complete. Defaults to `true`.
|
|
|
+(Optional, Boolean)
|
|
|
+If `true`, the request blocks until execution is complete. If `false`, the
|
|
|
+request returns immediately and execution runs asynchronously in the background.
|
|
|
+Defaults to `true`.
|