Snippet - Tasks

Tasks

POST /_tasks/NODE_ID:TASK_ID/_cancel

GET /_cat/tasks?v&pretty&h=action,type,node_id,task_id,running_time,node&s=running_time:desc

GET /_cat/tasks?v&pretty&h=action,task_id,parent_task_id,node,running_time&s=running_time:desc

Operations

POST /_tasks/_cancel?actions=*reindex

GET /_tasks?detailed=true&actions=*reindex

GET /_tasks?detailed=true&actions=*forcemerge

# Read-only index: expunge deleted documents; the task continues to completion.
POST /INDEX_NAME/_forcemerge?only_expunge_deletes=true

# Read-only index: merge to at most five segments; the task continues to completion.
POST /INDEX_NAME/_forcemerge?max_num_segments=5