2014-10-07 11:09:50 -04:00
|
|
|
[[indices-upgrade]]
|
|
|
|
== Upgrade
|
|
|
|
|
|
|
|
The upgrade API allows to upgrade one or more indices to the latest format
|
|
|
|
through an API. The upgrade process converts any segments written
|
|
|
|
with previous formats.
|
|
|
|
|
2014-10-11 10:22:24 -04:00
|
|
|
[float]
|
2014-10-07 11:09:50 -04:00
|
|
|
=== Start an upgrade
|
2014-10-11 10:22:24 -04:00
|
|
|
|
|
|
|
[source,sh]
|
2014-10-07 11:09:50 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
$ curl -XPOST 'http://localhost:9200/twitter/_upgrade'
|
|
|
|
--------------------------------------------------
|
|
|
|
|
2014-10-11 10:22:24 -04:00
|
|
|
NOTE: Upgrading is an I/O intensive operation, and is limited to processing a
|
|
|
|
single shard per node at a time. It also is not allowed to run at the same
|
|
|
|
time as optimize.
|
2014-10-07 11:09:50 -04:00
|
|
|
|
2015-02-10 17:52:19 -05:00
|
|
|
This call will block until the upgrade is complete. If the http connection
|
|
|
|
is lost, the request will continue in the background, and
|
|
|
|
any new requests will block until the previous upgrade is complete.
|
2014-10-07 11:09:50 -04:00
|
|
|
|
2014-10-11 10:22:24 -04:00
|
|
|
[float]
|
2014-10-07 11:09:50 -04:00
|
|
|
=== Check upgrade status
|
2014-10-11 10:22:24 -04:00
|
|
|
|
2014-10-07 11:09:50 -04:00
|
|
|
Use a `GET` request to monitor how much of an index is upgraded. This
|
|
|
|
can also be used prior to starting an upgrade to identify which indices
|
|
|
|
you want to upgrade at the same time.
|
2014-10-11 10:22:24 -04:00
|
|
|
|
|
|
|
[source,sh]
|
2014-10-07 11:09:50 -04:00
|
|
|
--------------------------------------------------
|
2015-01-16 07:55:22 -05:00
|
|
|
curl 'http://localhost:9200/twitter/_upgrade?pretty&human'
|
2014-10-07 11:09:50 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
|
|
|
{
|
|
|
|
"twitter": {
|
|
|
|
"size": "21gb",
|
|
|
|
"size_in_bytes": "21000000000",
|
|
|
|
"size_to_upgrade": "10gb",
|
|
|
|
"size_to_upgrade_in_bytes": "10000000000"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
--------------------------------------------------
|