mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 10:25:15 +00:00
Refresh flag in flush is problematic, since the shards refresh is allowed to execute on is different compared to the flush shards. In order to do flush and then refresh, they should be executed as separate APIs when needed. closes #3689
38 lines
1.2 KiB
Plaintext
38 lines
1.2 KiB
Plaintext
[[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
|
|
default, ElasticSearch uses memory heuristics in order to automatically
|
|
trigger flush operations as required in order to clear memory.
|
|
|
|
[source,js]
|
|
--------------------------------------------------
|
|
$ curl -XPOST 'http://localhost:9200/twitter/_flush'
|
|
--------------------------------------------------
|
|
|
|
[float]
|
|
=== Request Parameters
|
|
|
|
The flush API accepts the following request parameters:
|
|
|
|
[cols="<,<",options="header",]
|
|
|=======================================================================
|
|
|Name |Description
|
|
|=======================================================================
|
|
|
|
[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'
|
|
--------------------------------------------------
|