2013-08-28 19:24:34 -04:00
|
|
|
[[indices-flush]]
|
|
|
|
== Flush
|
|
|
|
|
|
|
|
The flush API allows to flush one or more indices through an API. The
|
|
|
|
flush process of an index basically frees memory from the index by
|
|
|
|
flushing data to the index storage and clearing the internal
|
|
|
|
<<index-modules-translog,transaction log>>. By
|
2014-01-06 15:58:46 -05:00
|
|
|
default, Elasticsearch uses memory heuristics in order to automatically
|
2013-08-28 19:24:34 -04:00
|
|
|
trigger flush operations as required in order to clear memory.
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
|
|
|
$ curl -XPOST 'http://localhost:9200/twitter/_flush'
|
|
|
|
--------------------------------------------------
|
|
|
|
|
|
|
|
[float]
|
|
|
|
=== Multi Index
|
|
|
|
|
|
|
|
The flush API can be applied to more than one index with a single call,
|
|
|
|
or even on `_all` the indices.
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
|
|
|
$ curl -XPOST 'http://localhost:9200/kimchy,elasticsearch/_flush'
|
|
|
|
|
|
|
|
$ curl -XPOST 'http://localhost:9200/_flush'
|
|
|
|
--------------------------------------------------
|