2013-08-28 19:24:34 -04:00
|
|
|
[[indices-refresh]]
|
2019-07-19 14:35:36 -04:00
|
|
|
=== Refresh
|
2013-08-28 19:24:34 -04:00
|
|
|
|
|
|
|
The refresh API allows to explicitly refresh one or more index, making
|
|
|
|
all operations performed since the last refresh available for search.
|
|
|
|
The (near) real-time capabilities depend on the index engine used. For
|
2014-01-09 09:57:08 -05:00
|
|
|
example, the internal one requires refresh to be called, but by default a
|
2013-08-28 19:24:34 -04:00
|
|
|
refresh is scheduled periodically.
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
2016-09-01 17:08:18 -04:00
|
|
|
POST /twitter/_refresh
|
2013-08-28 19:24:34 -04:00
|
|
|
--------------------------------------------------
|
2016-09-01 17:08:18 -04:00
|
|
|
// CONSOLE
|
|
|
|
// TEST[setup:twitter]
|
2013-08-28 19:24:34 -04:00
|
|
|
|
|
|
|
[float]
|
2019-07-19 14:35:36 -04:00
|
|
|
==== Multi Index
|
2013-08-28 19:24:34 -04:00
|
|
|
|
|
|
|
The refresh API can be applied to more than one index with a single
|
|
|
|
call, or even on `_all` the indices.
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
2016-09-01 17:08:18 -04:00
|
|
|
POST /kimchy,elasticsearch/_refresh
|
2013-08-28 19:24:34 -04:00
|
|
|
|
2016-09-01 17:08:18 -04:00
|
|
|
POST /_refresh
|
2013-08-28 19:24:34 -04:00
|
|
|
--------------------------------------------------
|
2016-09-01 17:08:18 -04:00
|
|
|
// CONSOLE
|
|
|
|
// TEST[s/^/PUT kimchy\nPUT elasticsearch\n/]
|