added searchShards method to the API
This commit is contained in:
@ -27,6 +27,7 @@ NOTE: This is currently the default API, but in upcomming versions that will cha
|
||||
* <<api-ping,ping>>
|
||||
* <<api-scroll,scroll>>
|
||||
* <<api-search,search>>
|
||||
* <<api-searchshards,searchShards>>
|
||||
* <<api-searchtemplate,searchTemplate>>
|
||||
* <<api-suggest,suggest>>
|
||||
* <<api-termvector,termvector>>
|
||||
@ -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 <<api-conventions,params and return values>> 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`
|
||||
|
||||
|
||||
@ -27,6 +27,7 @@ NOTE: At this time, you must opt into the 1.0 API by setting the `apiVersion` co
|
||||
* <<api-ping-1-0,ping>>
|
||||
* <<api-scroll-1-0,scroll>>
|
||||
* <<api-search-1-0,search>>
|
||||
* <<api-searchshards-1-0,searchShards>>
|
||||
* <<api-suggest-1-0,suggest>>
|
||||
* <<api-termvector-1-0,termvector>>
|
||||
* <<api-update-1-0,update>>
|
||||
@ -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 <<api-conventions,params and return values>> 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`
|
||||
|
||||
|
||||
@ -30,6 +30,7 @@ NOTE: At this time, you must opt into the 1.x API by setting the `apiVersion` co
|
||||
* <<api-ping-1-x,ping>>
|
||||
* <<api-scroll-1-x,scroll>>
|
||||
* <<api-search-1-x,search>>
|
||||
* <<api-searchshards-1-x,searchShards>>
|
||||
* <<api-searchtemplate-1-x,searchTemplate>>
|
||||
* <<api-suggest-1-x,suggest>>
|
||||
* <<api-termvector-1-x,termvector>>
|
||||
@ -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 <<api-conventions,params and return values>> 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`
|
||||
|
||||
|
||||
@ -30,6 +30,7 @@ NOTE: At this time, you must opt into the master API by setting the `apiVersion`
|
||||
* <<api-ping-master,ping>>
|
||||
* <<api-scroll-master,scroll>>
|
||||
* <<api-search-master,search>>
|
||||
* <<api-searchshards-master,searchShards>>
|
||||
* <<api-searchtemplate-master,searchTemplate>>
|
||||
* <<api-suggest-master,suggest>>
|
||||
* <<api-termvector-master,termvector>>
|
||||
@ -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 <<api-conventions,params and return values>> 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`
|
||||
|
||||
|
||||
@ -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;
|
||||
};
|
||||
|
||||
@ -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;
|
||||
};
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user