The Elasticsearch Reference Guide (Flush)

Flush

flush API allows one or more indexes to be refreshed through the API. The flush process of the index basically frees memory from the index by flushing the data to the index store and clearing the internal transaction log. By default, Elasticsearch uses a memory heuristic to automatically trigger a flush operation to clear memory as needed.

POST twitter/_flush

Request parameter

flush API accepts the following request parameters:

wait_if_ongoing

  • If set to true, if another flush operation is already in progress, the flush operation will block until flush can Executed. The default value is false, and if another flush operation is already running, it will cause an exception to be thrown at the fragmentation level.

force

  • Whether it should force flush, even if it is not necessary, that is, if no changes will be committed to the index, it is useful to increase the transaction log ID even if there are no uncommitted changes. (This setting can be considered as internal setting.)

多索引

flush API can be applied to multiple indexes with one call, and can even be applied to _allindex.

POST kimchy,elasticsearch/_flush

POST _flush