The 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.

POST twitter/_flush

Request Parametersedit

The flush API accepts the following request parameters:


If set to true(the default value) the flush operation will block until the flush can be executed if another flush operation is already executing.


Whether a flush should be forced even if it is not necessarily needed i.e. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal)

Multi Indexedit

The flush API can be applied to more than one index with a single call, or even on _all the indices.

POST kimchy,elasticsearch/_flush

POST _flush