Flush API
editFlush API
editFlushes one or more indices.
POST /twitter/_flush
Description
editThe flush API allows to flush one or more indices through an API. The flush process of an index makes sure that any data that is currently only persisted in the transaction log is also permanently persisted in Lucene. This reduces recovery times as that data doesn’t need to be reindexed from the transaction logs after the Lucene indexed is opened. By default, Elasticsearch uses heuristics in order to automatically trigger flushes as required. It is rare for users to need to call the API directly.
Path parameters
edit-
<index>
-
(Optional, string) Comma-separated list or wildcard expression of index names used to limit the request.
To flush all indices, omit this parameter or use a value of
_all
or*
.
Query parameters
edit-
allow_no_indices
-
(Optional, boolean) If
true
, the request does not return an error if a wildcard expression or_all
value retrieves only missing or closed indices.This parameter also applies to index aliases that point to a missing or closed index.
-
expand_wildcards
-
(Optional, string) Controls what kind of indices that wildcard expressions can expand to. Valid values are:
-
all
- Expand to open and closed indices.
-
open
- Expand only to open indices.
-
closed
- Expand only to closed indices.
-
none
- Wildcard expressions are not accepted.
Defaults to
open
. -
-
force
-
(Optional, boolean) If
true
, the request forces a flush even if there are no changes to commit to the index. Defaults totrue
.You can use this parameter to increment the generation number of the transaction log.
This parameter is considered internal.
-
ignore_unavailable
-
(Optional, boolean) If
true
, missing or closed indices are not included in the response. Defaults tofalse
. -
wait_if_ongoing
-
(Optional, boolean) If
true
, the flush operation blocks until execution when another flush operation is running.If
false
, Elasticsearch returns an error if you request a flush when another flush operation is running.Defaults to
true
.