|
@@ -5,9 +5,37 @@
|
|
|
<titleabbrev>Delete Job</titleabbrev>
|
|
|
++++
|
|
|
|
|
|
+experimental[]
|
|
|
+
|
|
|
This API deletes an existing rollup job. The job can be started or stopped, in both cases it will be deleted. Attempting
|
|
|
to delete a non-existing job will throw an exception
|
|
|
|
|
|
+.Deleting the job does not delete rolled up data
|
|
|
+**********************************
|
|
|
+When a job is deleted, that only removes the process that is actively monitoring and rolling up data.
|
|
|
+It does not delete any previously rolled up data. This is by design; a user may wish to roll up a static dataset. Because
|
|
|
+the dataset is static, once it has been fully rolled up there is no need to keep the indexing Rollup job around (as there
|
|
|
+will be no new data). So the job may be deleted, leaving behind the rolled up data for analysis.
|
|
|
+
|
|
|
+If you wish to also remove the rollup data, and the rollup index only contains the data for a single job, you can simply
|
|
|
+delete the whole rollup index. If the rollup index stores data from several jobs, you must issue a Delete-By-Query that
|
|
|
+targets the Rollup job's ID in the rollup index:
|
|
|
+
|
|
|
+
|
|
|
+[source,js]
|
|
|
+--------------------------------------------------
|
|
|
+POST my_rollup_index/_delete_by_query
|
|
|
+{
|
|
|
+ "query": {
|
|
|
+ "term": {
|
|
|
+ "_rollup.id": "the_rollup_job_id"
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+--------------------------------------------------
|
|
|
+// NOTCONSOLE
|
|
|
+
|
|
|
+**********************************
|
|
|
==== Request
|
|
|
|
|
|
`DELETE _xpack/rollup/job/<job_id>`
|