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 flush operation will block until the flush can be executed if another flush operation is already executing. The default is false and will cause an exception to be thrown on the shard level if another flush operation is already running.


Whether a flush should be forced even if it is not necessarily needed ie. 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