updated to the latest API, which moves the experimental benchmark API (in the unreleased API versions master and 1.x) and includes a new indices.updateAliases example. Closes #83
This commit is contained in:
14
docs/_examples/indices.updateAliases.asciidoc
Normal file
14
docs/_examples/indices.updateAliases.asciidoc
Normal file
@ -0,0 +1,14 @@
|
||||
.Perform an atomic alias swap, for a rotating index
|
||||
[source,js]
|
||||
---------
|
||||
client.indices.updateAliases({
|
||||
body: {
|
||||
actions: [
|
||||
{ remove: { index: 'logstash-2014.04', alias: 'logstash-current' } },
|
||||
{ add: { index: 'logstash-2014.05', alias: 'logstash-current' } }
|
||||
]
|
||||
}
|
||||
}).then(function (response) {
|
||||
// ...
|
||||
}, errorHandler);
|
||||
---------
|
||||
@ -3666,7 +3666,20 @@ Update specified aliases.
|
||||
|
||||
The default method is `POST` and the usual <<api-conventions,params and return values>> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-aliases.html[the elasticsearch docs] for more about this method.
|
||||
|
||||
// no examples
|
||||
.Perform an atomic alias swap, for a rotating index
|
||||
[source,js]
|
||||
---------
|
||||
client.indices.updateAliases({
|
||||
body: {
|
||||
actions: [
|
||||
{ remove: { index: 'logstash-2014.04', alias: 'logstash-current' } },
|
||||
{ add: { index: 'logstash-2014.05', alias: 'logstash-current' } }
|
||||
]
|
||||
}
|
||||
}).then(function (response) {
|
||||
// ...
|
||||
}, errorHandler);
|
||||
---------
|
||||
|
||||
|
||||
==== Params
|
||||
|
||||
@ -2915,7 +2915,20 @@ Update specified aliases.
|
||||
|
||||
The default method is `POST` and the usual <<api-conventions,params and return values>> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-aliases.html[the elasticsearch docs] for more about this method.
|
||||
|
||||
// no examples
|
||||
.Perform an atomic alias swap, for a rotating index
|
||||
[source,js]
|
||||
---------
|
||||
client.indices.updateAliases({
|
||||
body: {
|
||||
actions: [
|
||||
{ remove: { index: 'logstash-2014.04', alias: 'logstash-current' } },
|
||||
{ add: { index: 'logstash-2014.05', alias: 'logstash-current' } }
|
||||
]
|
||||
}
|
||||
}).then(function (response) {
|
||||
// ...
|
||||
}, errorHandler);
|
||||
---------
|
||||
|
||||
|
||||
==== Params
|
||||
|
||||
@ -3559,7 +3559,20 @@ Update specified aliases.
|
||||
|
||||
The default method is `POST` and the usual <<api-conventions,params and return values>> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-aliases.html[the elasticsearch docs] for more about this method.
|
||||
|
||||
// no examples
|
||||
.Perform an atomic alias swap, for a rotating index
|
||||
[source,js]
|
||||
---------
|
||||
client.indices.updateAliases({
|
||||
body: {
|
||||
actions: [
|
||||
{ remove: { index: 'logstash-2014.04', alias: 'logstash-current' } },
|
||||
{ add: { index: 'logstash-2014.05', alias: 'logstash-current' } }
|
||||
]
|
||||
}
|
||||
}).then(function (response) {
|
||||
// ...
|
||||
}, errorHandler);
|
||||
---------
|
||||
|
||||
|
||||
==== Params
|
||||
|
||||
@ -5,6 +5,8 @@
|
||||
NOTE: At this time, you must opt into the 1.x API by setting the `apiVersion` config parameter.
|
||||
|
||||
[[js-api-method-index-1-x]]
|
||||
* <<api-abortbenchmark-1-x,abortBenchmark>>
|
||||
* <<api-benchmark-1-x,benchmark>>
|
||||
* <<api-bulk-1-x,bulk>>
|
||||
* <<api-clearscroll-1-x,clearScroll>>
|
||||
* <<api-count-1-x,count>>
|
||||
@ -18,6 +20,7 @@ NOTE: At this time, you must opt into the 1.x API by setting the `apiVersion` co
|
||||
* <<api-getsource-1-x,getSource>>
|
||||
* <<api-index-1-x,index>>
|
||||
* <<api-info-1-x,info>>
|
||||
* <<api-listbenchmarks-1-x,listBenchmarks>>
|
||||
* <<api-mget-1-x,mget>>
|
||||
* <<api-mlt-1-x,mlt>>
|
||||
* <<api-mpercolate-1-x,mpercolate>>
|
||||
@ -31,9 +34,6 @@ NOTE: At this time, you must opt into the 1.x API by setting the `apiVersion` co
|
||||
* <<api-suggest-1-x,suggest>>
|
||||
* <<api-termvector-1-x,termvector>>
|
||||
* <<api-update-1-x,update>>
|
||||
* <<api-benchmark-abort-1-x,benchmark.abort>>
|
||||
* <<api-benchmark-list-1-x,benchmark.list>>
|
||||
* <<api-benchmark-submit-1-x,benchmark.submit>>
|
||||
* <<api-cat-aliases-1-x,cat.aliases>>
|
||||
* <<api-cat-allocation-1-x,cat.allocation>>
|
||||
* <<api-cat-count-1-x,cat.count>>
|
||||
@ -102,6 +102,56 @@ NOTE: At this time, you must opt into the 1.x API by setting the `apiVersion` co
|
||||
* <<api-snapshot-restore-1-x,snapshot.restore>>
|
||||
* <<api-snapshot-status-1-x,snapshot.status>>
|
||||
|
||||
[[api-abortbenchmark-1-x]]
|
||||
=== `abortBenchmark`
|
||||
|
||||
[source,js]
|
||||
--------
|
||||
client.abortBenchmark([params, [callback]])
|
||||
--------
|
||||
|
||||
// no description
|
||||
|
||||
The default method is `POST` and the usual <<api-conventions,params and return values>> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-benchmark.html[the elasticsearch docs] for more about this method.
|
||||
|
||||
// no examples
|
||||
|
||||
|
||||
==== Params
|
||||
|
||||
[horizontal]
|
||||
`name`::
|
||||
`String` -- A benchmark name
|
||||
|
||||
link:#[back to top]
|
||||
|
||||
[[api-benchmark-1-x]]
|
||||
=== `benchmark`
|
||||
|
||||
[source,js]
|
||||
--------
|
||||
client.benchmark([params, [callback]])
|
||||
--------
|
||||
|
||||
// no description
|
||||
|
||||
The default method is `PUT` and the usual <<api-conventions,params and return values>> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-benchmark.html[the elasticsearch docs] for more about this method.
|
||||
|
||||
// no examples
|
||||
|
||||
|
||||
==== Params
|
||||
|
||||
[horizontal]
|
||||
`verbose`::
|
||||
`Boolean` -- Specify whether to return verbose statistics about each iteration (default: false)
|
||||
`index`::
|
||||
`String, String[], Boolean` -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
||||
`type`::
|
||||
`String` -- The name of the document type
|
||||
|
||||
link:#[back to top]
|
||||
|
||||
[[api-bulk-1-x]]
|
||||
=== `bulk`
|
||||
|
||||
@ -919,6 +969,31 @@ The default method is `GET` and the usual <<api-conventions,params and return va
|
||||
|
||||
|
||||
|
||||
[[api-listbenchmarks-1-x]]
|
||||
=== `listBenchmarks`
|
||||
|
||||
[source,js]
|
||||
--------
|
||||
client.listBenchmarks([params, [callback]])
|
||||
--------
|
||||
|
||||
// no description
|
||||
|
||||
The default method is `GET` and the usual <<api-conventions,params and return values>> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-benchmark.html[the elasticsearch docs] for more about this method.
|
||||
|
||||
// no examples
|
||||
|
||||
|
||||
==== Params
|
||||
|
||||
[horizontal]
|
||||
`index`::
|
||||
`String, String[], Boolean` -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
||||
`type`::
|
||||
`String` -- The name of the document type
|
||||
|
||||
link:#[back to top]
|
||||
|
||||
[[api-mget-1-x]]
|
||||
=== `mget`
|
||||
|
||||
@ -1839,81 +1914,6 @@ Options:::
|
||||
|
||||
link:#[back to top]
|
||||
|
||||
[[api-benchmark-abort-1-x]]
|
||||
=== `benchmark.abort`
|
||||
|
||||
[source,js]
|
||||
--------
|
||||
client.benchmark.abort([params, [callback]])
|
||||
--------
|
||||
|
||||
// no description
|
||||
|
||||
The default method is `POST` and the usual <<api-conventions,params and return values>> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-benchmark.html[the elasticsearch docs] for more about this method.
|
||||
|
||||
// no examples
|
||||
|
||||
|
||||
==== Params
|
||||
|
||||
[horizontal]
|
||||
`name`::
|
||||
`String` -- A benchmark name
|
||||
|
||||
link:#[back to top]
|
||||
|
||||
[[api-benchmark-list-1-x]]
|
||||
=== `benchmark.list`
|
||||
|
||||
[source,js]
|
||||
--------
|
||||
client.benchmark.list([params, [callback]])
|
||||
--------
|
||||
|
||||
// no description
|
||||
|
||||
The default method is `GET` and the usual <<api-conventions,params and return values>> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-benchmark.html[the elasticsearch docs] for more about this method.
|
||||
|
||||
// no examples
|
||||
|
||||
|
||||
==== Params
|
||||
|
||||
[horizontal]
|
||||
`index`::
|
||||
`String, String[], Boolean` -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
||||
`type`::
|
||||
`String` -- The name of the document type
|
||||
|
||||
link:#[back to top]
|
||||
|
||||
[[api-benchmark-submit-1-x]]
|
||||
=== `benchmark.submit`
|
||||
|
||||
[source,js]
|
||||
--------
|
||||
client.benchmark.submit([params, [callback]])
|
||||
--------
|
||||
|
||||
// no description
|
||||
|
||||
The default method is `PUT` and the usual <<api-conventions,params and return values>> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-benchmark.html[the elasticsearch docs] for more about this method.
|
||||
|
||||
// no examples
|
||||
|
||||
|
||||
==== Params
|
||||
|
||||
[horizontal]
|
||||
`verbose`::
|
||||
`Boolean` -- Specify whether to return verbose statistics about each iteration (default: false)
|
||||
`index`::
|
||||
`String, String[], Boolean` -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
||||
`type`::
|
||||
`String` -- The name of the document type
|
||||
|
||||
link:#[back to top]
|
||||
|
||||
[[api-cat-aliases-1-x]]
|
||||
=== `cat.aliases`
|
||||
|
||||
@ -3736,7 +3736,20 @@ Update specified aliases.
|
||||
|
||||
The default method is `POST` and the usual <<api-conventions,params and return values>> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-aliases.html[the elasticsearch docs] for more about this method.
|
||||
|
||||
// no examples
|
||||
.Perform an atomic alias swap, for a rotating index
|
||||
[source,js]
|
||||
---------
|
||||
client.indices.updateAliases({
|
||||
body: {
|
||||
actions: [
|
||||
{ remove: { index: 'logstash-2014.04', alias: 'logstash-current' } },
|
||||
{ add: { index: 'logstash-2014.05', alias: 'logstash-current' } }
|
||||
]
|
||||
}
|
||||
}).then(function (response) {
|
||||
// ...
|
||||
}, errorHandler);
|
||||
---------
|
||||
|
||||
|
||||
==== Params
|
||||
|
||||
@ -5,6 +5,8 @@
|
||||
NOTE: At this time, you must opt into the master API by setting the `apiVersion` config parameter.
|
||||
|
||||
[[js-api-method-index-master]]
|
||||
* <<api-abortbenchmark-master,abortBenchmark>>
|
||||
* <<api-benchmark-master,benchmark>>
|
||||
* <<api-bulk-master,bulk>>
|
||||
* <<api-clearscroll-master,clearScroll>>
|
||||
* <<api-count-master,count>>
|
||||
@ -18,6 +20,7 @@ NOTE: At this time, you must opt into the master API by setting the `apiVersion`
|
||||
* <<api-getsource-master,getSource>>
|
||||
* <<api-index-master,index>>
|
||||
* <<api-info-master,info>>
|
||||
* <<api-listbenchmarks-master,listBenchmarks>>
|
||||
* <<api-mget-master,mget>>
|
||||
* <<api-mlt-master,mlt>>
|
||||
* <<api-mpercolate-master,mpercolate>>
|
||||
@ -31,9 +34,6 @@ NOTE: At this time, you must opt into the master API by setting the `apiVersion`
|
||||
* <<api-suggest-master,suggest>>
|
||||
* <<api-termvector-master,termvector>>
|
||||
* <<api-update-master,update>>
|
||||
* <<api-benchmark-abort-master,benchmark.abort>>
|
||||
* <<api-benchmark-list-master,benchmark.list>>
|
||||
* <<api-benchmark-submit-master,benchmark.submit>>
|
||||
* <<api-cat-aliases-master,cat.aliases>>
|
||||
* <<api-cat-allocation-master,cat.allocation>>
|
||||
* <<api-cat-count-master,cat.count>>
|
||||
@ -102,6 +102,56 @@ NOTE: At this time, you must opt into the master API by setting the `apiVersion`
|
||||
* <<api-snapshot-restore-master,snapshot.restore>>
|
||||
* <<api-snapshot-status-master,snapshot.status>>
|
||||
|
||||
[[api-abortbenchmark-master]]
|
||||
=== `abortBenchmark`
|
||||
|
||||
[source,js]
|
||||
--------
|
||||
client.abortBenchmark([params, [callback]])
|
||||
--------
|
||||
|
||||
// no description
|
||||
|
||||
The default method is `POST` and the usual <<api-conventions,params and return values>> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-benchmark.html[the elasticsearch docs] for more about this method.
|
||||
|
||||
// no examples
|
||||
|
||||
|
||||
==== Params
|
||||
|
||||
[horizontal]
|
||||
`name`::
|
||||
`String` -- A benchmark name
|
||||
|
||||
link:#[back to top]
|
||||
|
||||
[[api-benchmark-master]]
|
||||
=== `benchmark`
|
||||
|
||||
[source,js]
|
||||
--------
|
||||
client.benchmark([params, [callback]])
|
||||
--------
|
||||
|
||||
// no description
|
||||
|
||||
The default method is `PUT` and the usual <<api-conventions,params and return values>> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-benchmark.html[the elasticsearch docs] for more about this method.
|
||||
|
||||
// no examples
|
||||
|
||||
|
||||
==== Params
|
||||
|
||||
[horizontal]
|
||||
`verbose`::
|
||||
`Boolean` -- Specify whether to return verbose statistics about each iteration (default: false)
|
||||
`index`::
|
||||
`String, String[], Boolean` -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
||||
`type`::
|
||||
`String` -- The name of the document type
|
||||
|
||||
link:#[back to top]
|
||||
|
||||
[[api-bulk-master]]
|
||||
=== `bulk`
|
||||
|
||||
@ -919,6 +969,31 @@ The default method is `GET` and the usual <<api-conventions,params and return va
|
||||
|
||||
|
||||
|
||||
[[api-listbenchmarks-master]]
|
||||
=== `listBenchmarks`
|
||||
|
||||
[source,js]
|
||||
--------
|
||||
client.listBenchmarks([params, [callback]])
|
||||
--------
|
||||
|
||||
// no description
|
||||
|
||||
The default method is `GET` and the usual <<api-conventions,params and return values>> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-benchmark.html[the elasticsearch docs] for more about this method.
|
||||
|
||||
// no examples
|
||||
|
||||
|
||||
==== Params
|
||||
|
||||
[horizontal]
|
||||
`index`::
|
||||
`String, String[], Boolean` -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
||||
`type`::
|
||||
`String` -- The name of the document type
|
||||
|
||||
link:#[back to top]
|
||||
|
||||
[[api-mget-master]]
|
||||
=== `mget`
|
||||
|
||||
@ -1839,81 +1914,6 @@ Options:::
|
||||
|
||||
link:#[back to top]
|
||||
|
||||
[[api-benchmark-abort-master]]
|
||||
=== `benchmark.abort`
|
||||
|
||||
[source,js]
|
||||
--------
|
||||
client.benchmark.abort([params, [callback]])
|
||||
--------
|
||||
|
||||
// no description
|
||||
|
||||
The default method is `POST` and the usual <<api-conventions,params and return values>> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-benchmark.html[the elasticsearch docs] for more about this method.
|
||||
|
||||
// no examples
|
||||
|
||||
|
||||
==== Params
|
||||
|
||||
[horizontal]
|
||||
`name`::
|
||||
`String` -- A benchmark name
|
||||
|
||||
link:#[back to top]
|
||||
|
||||
[[api-benchmark-list-master]]
|
||||
=== `benchmark.list`
|
||||
|
||||
[source,js]
|
||||
--------
|
||||
client.benchmark.list([params, [callback]])
|
||||
--------
|
||||
|
||||
// no description
|
||||
|
||||
The default method is `GET` and the usual <<api-conventions,params and return values>> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-benchmark.html[the elasticsearch docs] for more about this method.
|
||||
|
||||
// no examples
|
||||
|
||||
|
||||
==== Params
|
||||
|
||||
[horizontal]
|
||||
`index`::
|
||||
`String, String[], Boolean` -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
||||
`type`::
|
||||
`String` -- The name of the document type
|
||||
|
||||
link:#[back to top]
|
||||
|
||||
[[api-benchmark-submit-master]]
|
||||
=== `benchmark.submit`
|
||||
|
||||
[source,js]
|
||||
--------
|
||||
client.benchmark.submit([params, [callback]])
|
||||
--------
|
||||
|
||||
// no description
|
||||
|
||||
The default method is `PUT` and the usual <<api-conventions,params and return values>> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-benchmark.html[the elasticsearch docs] for more about this method.
|
||||
|
||||
// no examples
|
||||
|
||||
|
||||
==== Params
|
||||
|
||||
[horizontal]
|
||||
`verbose`::
|
||||
`Boolean` -- Specify whether to return verbose statistics about each iteration (default: false)
|
||||
`index`::
|
||||
`String, String[], Boolean` -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
||||
`type`::
|
||||
`String` -- The name of the document type
|
||||
|
||||
link:#[back to top]
|
||||
|
||||
[[api-cat-aliases-master]]
|
||||
=== `cat.aliases`
|
||||
|
||||
@ -3736,7 +3736,20 @@ Update specified aliases.
|
||||
|
||||
The default method is `POST` and the usual <<api-conventions,params and return values>> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/indices-aliases.html[the elasticsearch docs] for more about this method.
|
||||
|
||||
// no examples
|
||||
.Perform an atomic alias swap, for a rotating index
|
||||
[source,js]
|
||||
---------
|
||||
client.indices.updateAliases({
|
||||
body: {
|
||||
actions: [
|
||||
{ remove: { index: 'logstash-2014.04', alias: 'logstash-current' } },
|
||||
{ add: { index: 'logstash-2014.05', alias: 'logstash-current' } }
|
||||
]
|
||||
}
|
||||
}).then(function (response) {
|
||||
// ...
|
||||
}, errorHandler);
|
||||
---------
|
||||
|
||||
|
||||
==== Params
|
||||
|
||||
Reference in New Issue
Block a user