Performs the force merge operation on one or more indices Added in 2.1.0
Query parameters
-
allow_no_indices boolean
Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes
_all
string or when no indices have been specified) -
expand_wildcards string | array[string]
Whether to expand wildcard expression to concrete indices that are open, closed or both.
-
flush boolean
Specify whether the index should be flushed after performing the operation (default: true)
-
max_num_segments number
The number of segments the index should be merged into (default: dynamic)
-
only_expunge_deletes boolean
Specify whether the operation should only expunge deleted documents
-
wait_for_completion boolean
Should the request wait until the force merge is completed.
POST /_forcemerge
curl \
-X POST http://api.example.com/_forcemerge
Response examples (200)
{
"_shards": {
"failed": 42.0,
"successful": 42.0,
"total": 42.0,
"failures": [
{
"index": "string",
"node": "string",
"reason": {
"type": "string",
"reason": "string",
"stack_trace": "string",
"caused_by": {},
"root_cause": [
{}
],
"suppressed": [
{}
]
},
"shard": 42.0,
"status": "string"
}
],
"skipped": 42.0
},
"task": "string"
}