diff --git a/docs/api_methods.asciidoc b/docs/api_methods.asciidoc index 7a1b57a75..4c15ec3d1 100644 --- a/docs/api_methods.asciidoc +++ b/docs/api_methods.asciidoc @@ -27,6 +27,7 @@ NOTE: This is currently the default API, but in upcomming versions that will cha * <> * <> * <> +* <> * <> * <> * <> @@ -1528,6 +1529,47 @@ Options::: link:#[back to top] +[[api-searchshards]] +=== `searchShards` + +[source,js] +-------- +client.searchShards([params, [callback]]) +-------- + +// no description + +The default method is `POST` and the usual <> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-shards.html[the elasticsearch docs] for more about this method. + +// no examples + + +==== Params + +[horizontal] +`preference`:: +`String` -- Specify the node or shard the operation should be performed on (default: random) +`routing`:: +`String` -- Specific routing value +`local`:: +`Boolean` -- Return local information, do not retrieve the state from master node (default: false) +`ignoreUnavailable`:: +`Boolean` -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +`Boolean` -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +`String` -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + +`index`:: +`String` -- The name of the index +`type`:: +`String` -- The type of the document + +link:#[back to top] + [[api-searchtemplate]] === `searchTemplate` diff --git a/docs/api_methods_1_0.asciidoc b/docs/api_methods_1_0.asciidoc index 0fde9556f..a209aed5a 100644 --- a/docs/api_methods_1_0.asciidoc +++ b/docs/api_methods_1_0.asciidoc @@ -27,6 +27,7 @@ NOTE: At this time, you must opt into the 1.0 API by setting the `apiVersion` co * <> * <> * <> +* <> * <> * <> * <> @@ -1510,6 +1511,47 @@ Options::: link:#[back to top] +[[api-searchshards-1-0]] +=== `searchShards` + +[source,js] +-------- +client.searchShards([params, [callback]]) +-------- + +// no description + +The default method is `POST` and the usual <> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-shards.html[the elasticsearch docs] for more about this method. + +// no examples + + +==== Params + +[horizontal] +`preference`:: +`String` -- Specify the node or shard the operation should be performed on (default: random) +`routing`:: +`String` -- Specific routing value +`local`:: +`Boolean` -- Return local information, do not retrieve the state from master node (default: false) +`ignoreUnavailable`:: +`Boolean` -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +`Boolean` -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +`String` -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + +`index`:: +`String` -- The name of the index +`type`:: +`String` -- The type of the document + +link:#[back to top] + [[api-suggest-1-0]] === `suggest` diff --git a/docs/api_methods_1_x.asciidoc b/docs/api_methods_1_x.asciidoc index 74b105142..de454b9b8 100644 --- a/docs/api_methods_1_x.asciidoc +++ b/docs/api_methods_1_x.asciidoc @@ -30,6 +30,7 @@ NOTE: At this time, you must opt into the 1.x API by setting the `apiVersion` co * <> * <> * <> +* <> * <> * <> * <> @@ -1605,6 +1606,47 @@ Options::: link:#[back to top] +[[api-searchshards-1-x]] +=== `searchShards` + +[source,js] +-------- +client.searchShards([params, [callback]]) +-------- + +// no description + +The default method is `POST` and the usual <> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-shards.html[the elasticsearch docs] for more about this method. + +// no examples + + +==== Params + +[horizontal] +`preference`:: +`String` -- Specify the node or shard the operation should be performed on (default: random) +`routing`:: +`String` -- Specific routing value +`local`:: +`Boolean` -- Return local information, do not retrieve the state from master node (default: false) +`ignoreUnavailable`:: +`Boolean` -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +`Boolean` -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +`String` -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + +`index`:: +`String` -- The name of the index +`type`:: +`String` -- The type of the document + +link:#[back to top] + [[api-searchtemplate-1-x]] === `searchTemplate` diff --git a/docs/api_methods_master.asciidoc b/docs/api_methods_master.asciidoc index c75751ab4..7b7c95747 100644 --- a/docs/api_methods_master.asciidoc +++ b/docs/api_methods_master.asciidoc @@ -30,6 +30,7 @@ NOTE: At this time, you must opt into the master API by setting the `apiVersion` * <> * <> * <> +* <> * <> * <> * <> @@ -1605,6 +1606,47 @@ Options::: link:#[back to top] +[[api-searchshards-master]] +=== `searchShards` + +[source,js] +-------- +client.searchShards([params, [callback]]) +-------- + +// no description + +The default method is `POST` and the usual <> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-shards.html[the elasticsearch docs] for more about this method. + +// no examples + + +==== Params + +[horizontal] +`preference`:: +`String` -- Specify the node or shard the operation should be performed on (default: random) +`routing`:: +`String` -- Specific routing value +`local`:: +`Boolean` -- Return local information, do not retrieve the state from master node (default: false) +`ignoreUnavailable`:: +`Boolean` -- Whether specified concrete indices should be ignored when unavailable (missing or closed) +`allowNoIndices`:: +`Boolean` -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +`[expandWildcards=open]`:: +`String` -- Whether to expand wildcard expression to concrete indices that are open, closed or both. +Options::: + * `"open"` + * `"closed"` + +`index`:: +`String` -- The name of the index +`type`:: +`String` -- The type of the document + +link:#[back to top] + [[api-searchtemplate-master]] === `searchTemplate` diff --git a/src/lib/apis/1_0.js b/src/lib/apis/1_0.js index 22d20452d..2e28eae44 100644 --- a/src/lib/apis/1_0.js +++ b/src/lib/apis/1_0.js @@ -4679,6 +4679,75 @@ api.search = ca({ method: 'POST' }); +/** + * Perform a [searchShards](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-shards.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {String} params.routing - Specific routing value + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String} params.index - The name of the index + * @param {String} params.type - The type of the document + */ +api.searchShards = ca({ + params: { + preference: { + type: 'string' + }, + routing: { + type: 'string' + }, + local: { + type: 'boolean' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_search_shards', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/_search_shards', + req: { + index: { + type: 'string' + } + } + }, + { + fmt: '/_search_shards' + } + ], + method: 'POST' +}); + api.snapshot = function SnapshotNS(transport) { this.transport = transport; }; diff --git a/src/lib/apis/1_1.js b/src/lib/apis/1_1.js index 1b2b9d29d..21d21f343 100644 --- a/src/lib/apis/1_1.js +++ b/src/lib/apis/1_1.js @@ -4806,6 +4806,75 @@ api.searchTemplate = ca({ method: 'POST' }); +/** + * Perform a [searchShards](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-shards.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {String} params.routing - Specific routing value + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String} params.index - The name of the index + * @param {String} params.type - The type of the document + */ +api.searchShards = ca({ + params: { + preference: { + type: 'string' + }, + routing: { + type: 'string' + }, + local: { + type: 'boolean' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_search_shards', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/_search_shards', + req: { + index: { + type: 'string' + } + } + }, + { + fmt: '/_search_shards' + } + ], + method: 'POST' +}); + api.snapshot = function SnapshotNS(transport) { this.transport = transport; }; diff --git a/src/lib/apis/1_x.js b/src/lib/apis/1_x.js index c4e3f248e..f601291e0 100644 --- a/src/lib/apis/1_x.js +++ b/src/lib/apis/1_x.js @@ -4823,6 +4823,75 @@ api.search = ca({ method: 'POST' }); +/** + * Perform a [searchShards](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-shards.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {String} params.routing - Specific routing value + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String} params.index - The name of the index + * @param {String} params.type - The type of the document + */ +api.searchShards = ca({ + params: { + preference: { + type: 'string' + }, + routing: { + type: 'string' + }, + local: { + type: 'boolean' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_search_shards', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/_search_shards', + req: { + index: { + type: 'string' + } + } + }, + { + fmt: '/_search_shards' + } + ], + method: 'POST' +}); + /** * Perform a [searchTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-template.html) request * diff --git a/src/lib/apis/master.js b/src/lib/apis/master.js index 3e88b7fb3..c875dda8e 100644 --- a/src/lib/apis/master.js +++ b/src/lib/apis/master.js @@ -4823,6 +4823,75 @@ api.search = ca({ method: 'POST' }); +/** + * Perform a [searchShards](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-shards.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random) + * @param {String} params.routing - Specific routing value + * @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false) + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {String} params.index - The name of the index + * @param {String} params.type - The type of the document + */ +api.searchShards = ca({ + params: { + preference: { + type: 'string' + }, + routing: { + type: 'string' + }, + local: { + type: 'boolean' + }, + ignoreUnavailable: { + type: 'boolean', + name: 'ignore_unavailable' + }, + allowNoIndices: { + type: 'boolean', + name: 'allow_no_indices' + }, + expandWildcards: { + type: 'enum', + 'default': 'open', + options: [ + 'open', + 'closed' + ], + name: 'expand_wildcards' + } + }, + urls: [ + { + fmt: '/<%=index%>/<%=type%>/_search_shards', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/_search_shards', + req: { + index: { + type: 'string' + } + } + }, + { + fmt: '/_search_shards' + } + ], + method: 'POST' +}); + /** * Perform a [searchTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-template.html) request *