Merge remote-tracking branch 'upstream/master' into browser_tests_for_travis
This commit is contained in:
@ -250,12 +250,22 @@ The default method is `GET` and the usual <<api-conventions,params and return va
|
|||||||
==== Params
|
==== Params
|
||||||
|
|
||||||
[horizontal]
|
[horizontal]
|
||||||
|
`completionFields`::
|
||||||
|
`String, String[], Boolean` -- A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
|
||||||
|
`fielddataFields`::
|
||||||
|
`String, String[], Boolean` -- A comma-separated list of fields for `fielddata` index metric (supports wildcards)
|
||||||
`fields`::
|
`fields`::
|
||||||
`String, String[], Boolean` -- A comma-separated list of fields to return detailed information for, when returning the `indices` metric family (supports wildcards)
|
`String, String[], Boolean` -- A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
|
||||||
`metricFamily`::
|
`groups`::
|
||||||
`String` -- Limit the information returned to a certain metric family
|
`Boolean` -- A comma-separated list of search groups for `search` index metric
|
||||||
|
`[level=node]`::
|
||||||
|
`String` -- Return indices stats aggregated at node, index or shard level
|
||||||
|
`types`::
|
||||||
|
`String, String[], Boolean` -- A comma-separated list of document types for the `indexing` index metric
|
||||||
`metric`::
|
`metric`::
|
||||||
`String` -- Limit the information returned for `indices` family to a specific metric. Isn't used if `indices` (or `all`) metric family isn't specified.
|
`String, String[], Boolean` -- Limit the information returned to the specified metrics
|
||||||
|
`indexMetric`::
|
||||||
|
`String, String[], Boolean` -- Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified.
|
||||||
`nodeId`::
|
`nodeId`::
|
||||||
`String, String[], Boolean` -- A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
|
`String, String[], Boolean` -- A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
|
||||||
|
|
||||||
@ -321,24 +331,16 @@ The default method is `GET` and the usual <<api-conventions,params and return va
|
|||||||
==== Params
|
==== Params
|
||||||
|
|
||||||
[horizontal]
|
[horizontal]
|
||||||
`filterBlocks`::
|
|
||||||
`Boolean` -- Do not return information about blocks
|
|
||||||
`filterIndexTemplates`::
|
|
||||||
`Boolean` -- Do not return information about index templates
|
|
||||||
`filterIndices`::
|
|
||||||
`String, String[], Boolean` -- Limit returned metadata information to specific indices
|
|
||||||
`filterMetadata`::
|
|
||||||
`Boolean` -- Do not return information about indices metadata
|
|
||||||
`filterNodes`::
|
|
||||||
`Boolean` -- Do not return information about nodes
|
|
||||||
`filterRoutingTable`::
|
|
||||||
`Boolean` -- Do not return information about shard allocation (`routing_table` and `routing_nodes`)
|
|
||||||
`local`::
|
`local`::
|
||||||
`Boolean` -- Return local information, do not retrieve the state from master node (default: false)
|
`Boolean` -- Return local information, do not retrieve the state from master node (default: false)
|
||||||
`masterTimeout`::
|
`masterTimeout`::
|
||||||
`Date, Number` -- Specify timeout for connection to master
|
`Date, Number` -- Specify timeout for connection to master
|
||||||
`flatSettings`::
|
`flatSettings`::
|
||||||
`Boolean` -- Return settings in flat format (default: false)
|
`Boolean` -- Return settings in flat format (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
|
||||||
|
`metric`::
|
||||||
|
`String, String[], Boolean` -- Limit the information returned to the specified metrics
|
||||||
|
|
||||||
[[api-count]]
|
[[api-count]]
|
||||||
=== `count`
|
=== `count`
|
||||||
@ -1327,6 +1329,8 @@ The default method is `GET` and the usual <<api-conventions,params and return va
|
|||||||
`Date, Number` -- Explicit operation timeout
|
`Date, Number` -- Explicit operation timeout
|
||||||
`index`::
|
`index`::
|
||||||
`String, String[], Boolean` -- A comma-separated list of index names to filter aliases
|
`String, String[], Boolean` -- A comma-separated list of index names to filter aliases
|
||||||
|
`name`::
|
||||||
|
`String, String[], Boolean` -- A comma-separated list of alias names to filter
|
||||||
|
|
||||||
[[api-indices-getfieldmapping]]
|
[[api-indices-getfieldmapping]]
|
||||||
=== `indices.getFieldMapping`
|
=== `indices.getFieldMapping`
|
||||||
@ -1420,6 +1424,8 @@ The default method is `GET` and the usual <<api-conventions,params and return va
|
|||||||
`Boolean` -- Return settings in flat format (default: false)
|
`Boolean` -- Return settings in flat format (default: false)
|
||||||
`index`::
|
`index`::
|
||||||
`String, String[], Boolean` -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
`String, String[], Boolean` -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
||||||
|
`name`::
|
||||||
|
`String` -- The name of the settings that should be included
|
||||||
|
|
||||||
[[api-indices-gettemplate]]
|
[[api-indices-gettemplate]]
|
||||||
=== `indices.getTemplate`
|
=== `indices.getTemplate`
|
||||||
@ -1803,58 +1809,22 @@ The default method is `GET` and the usual <<api-conventions,params and return va
|
|||||||
==== Params
|
==== Params
|
||||||
|
|
||||||
[horizontal]
|
[horizontal]
|
||||||
`all`::
|
|
||||||
`Boolean` -- Return all available information
|
|
||||||
`clear`::
|
|
||||||
`Boolean` -- Reset the default level of detail
|
|
||||||
`completion`::
|
|
||||||
`Boolean` -- Return information about completion suggester stats
|
|
||||||
`completionFields`::
|
`completionFields`::
|
||||||
`String, String[], Boolean` -- A comma-separated list of fields for `completion` metric (supports wildcards)
|
`String, String[], Boolean` -- A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
|
||||||
`docs`::
|
|
||||||
`Boolean` -- Return information about indexed and deleted documents
|
|
||||||
`fielddata`::
|
|
||||||
`Boolean` -- Return information about field data
|
|
||||||
`fielddataFields`::
|
`fielddataFields`::
|
||||||
`String, String[], Boolean` -- A comma-separated list of fields for `fielddata` metric (supports wildcards)
|
`String, String[], Boolean` -- A comma-separated list of fields for `fielddata` index metric (supports wildcards)
|
||||||
`fields`::
|
`fields`::
|
||||||
`String, String[], Boolean` -- A comma-separated list of fields to return detailed information for, when returning the `search` statistics
|
`String, String[], Boolean` -- A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
|
||||||
`filterCache`::
|
|
||||||
`Boolean` -- Return information about filter cache
|
|
||||||
`flush`::
|
|
||||||
`Boolean` -- Return information about flush operations
|
|
||||||
`get`::
|
|
||||||
`Boolean` -- Return information about get operations
|
|
||||||
`groups`::
|
`groups`::
|
||||||
`Boolean` -- A comma-separated list of search groups for `search` statistics
|
`Boolean` -- A comma-separated list of search groups for `search` index metric
|
||||||
`idCache`::
|
`[level=indices]`::
|
||||||
`Boolean` -- Return information about ID cache
|
`String` -- Return stats aggregated at cluster, index or shard level
|
||||||
`ignoreUnavailable`::
|
`types`::
|
||||||
`Boolean` -- Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
`String, String[], Boolean` -- A comma-separated list of document types for the `indexing` index metric
|
||||||
`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.
|
|
||||||
`indexing`::
|
|
||||||
`Boolean` -- Return information about indexing operations
|
|
||||||
`merge`::
|
|
||||||
`Boolean` -- Return information about merge operations
|
|
||||||
`refresh`::
|
|
||||||
`Boolean` -- Return information about refresh operations
|
|
||||||
`search`::
|
|
||||||
`Boolean` -- Return information about search operations; use the `groups` parameter to include information for specific search groups
|
|
||||||
`store`::
|
|
||||||
`Boolean` -- Return information about the size of the index
|
|
||||||
`warmer`::
|
|
||||||
`Boolean` -- Return information about warmers
|
|
||||||
`index`::
|
`index`::
|
||||||
`String, String[], Boolean` -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
`String, String[], Boolean` -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
||||||
`indexingTypes`::
|
`metric`::
|
||||||
`String, String[], Boolean` -- A comma-separated list of document types to include in the `indexing` statistics
|
`String, String[], Boolean` -- Limit the information returned the specific metrics.
|
||||||
`metricFamily`::
|
|
||||||
`String` -- Limit the information returned to a specific metric
|
|
||||||
`searchGroups`::
|
|
||||||
`String, String[], Boolean` -- A comma-separated list of search groups to include in the `search` statistics
|
|
||||||
|
|
||||||
[[api-indices-status]]
|
[[api-indices-status]]
|
||||||
=== `indices.status`
|
=== `indices.status`
|
||||||
@ -2067,13 +2037,13 @@ client.mlt({
|
|||||||
`Number` -- The word occurrence frequency as count: words with higher occurrence in the corpus will be ignored
|
`Number` -- The word occurrence frequency as count: words with higher occurrence in the corpus will be ignored
|
||||||
`maxQueryTerms`::
|
`maxQueryTerms`::
|
||||||
`Number` -- The maximum query terms to be included in the generated query
|
`Number` -- The maximum query terms to be included in the generated query
|
||||||
`maxWordLen`::
|
`maxWordLength`::
|
||||||
`Number` -- The minimum length of the word: longer words will be ignored
|
`Number` -- The minimum length of the word: longer words will be ignored
|
||||||
`minDocFreq`::
|
`minDocFreq`::
|
||||||
`Number` -- The word occurrence frequency as count: words with lower occurrence in the corpus will be ignored
|
`Number` -- The word occurrence frequency as count: words with lower occurrence in the corpus will be ignored
|
||||||
`minTermFreq`::
|
`minTermFreq`::
|
||||||
`Number` -- The term frequency as percent: terms with lower occurence in the source document will be ignored
|
`Number` -- The term frequency as percent: terms with lower occurence in the source document will be ignored
|
||||||
`minWordLen`::
|
`minWordLength`::
|
||||||
`Number` -- The minimum length of the word: shorter words will be ignored
|
`Number` -- The minimum length of the word: shorter words will be ignored
|
||||||
`mltFields`::
|
`mltFields`::
|
||||||
`String, String[], Boolean` -- Specific fields to perform the query against
|
`String, String[], Boolean` -- Specific fields to perform the query against
|
||||||
|
|||||||
@ -338,6 +338,11 @@ aliases = {
|
|||||||
'indices.deleteMapping': [
|
'indices.deleteMapping': [
|
||||||
'/{index}/{type}/_mapping'
|
'/{index}/{type}/_mapping'
|
||||||
],
|
],
|
||||||
|
'indices.deleteWarmer': [
|
||||||
|
'/{index}/_warmer',
|
||||||
|
'/{index}/_warmers',
|
||||||
|
'/{index}/_warmers/{name}'
|
||||||
|
],
|
||||||
'indices.stats': [
|
'indices.stats': [
|
||||||
'_stats/{metric_family}',
|
'_stats/{metric_family}',
|
||||||
'/_stats/indexing',
|
'/_stats/indexing',
|
||||||
@ -348,8 +353,5 @@ aliases = {
|
|||||||
'/{index}/_stats/indexing',
|
'/{index}/_stats/indexing',
|
||||||
'/{index}/_stats/search/{search_groups}',
|
'/{index}/_stats/search/{search_groups}',
|
||||||
'/{index}/_stats/fielddata/{fields}'
|
'/{index}/_stats/fielddata/{fields}'
|
||||||
],
|
]
|
||||||
// 'search': [
|
|
||||||
// '/_search'
|
|
||||||
// ]
|
|
||||||
};
|
};
|
||||||
Submodule src/elasticsearch updated: f58ad85335...6389432b28
685
src/lib/api.js
685
src/lib/api.js
@ -339,28 +339,57 @@ api.cluster.prototype.nodeShutdown = ca({
|
|||||||
* Perform a [cluster.nodeStats](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html) request
|
* Perform a [cluster.nodeStats](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html) request
|
||||||
*
|
*
|
||||||
* @param {Object} params - An object with parameters used to carry out this action
|
* @param {Object} params - An object with parameters used to carry out this action
|
||||||
* @param {String, String[], Boolean} params.fields - A comma-separated list of fields to return detailed information for, when returning the `indices` metric family (supports wildcards)
|
* @param {String, String[], Boolean} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
|
||||||
* @param {String} params.metricFamily - Limit the information returned to a certain metric family
|
* @param {String, String[], Boolean} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards)
|
||||||
* @param {String} params.metric - Limit the information returned for `indices` family to a specific metric. Isn't used if `indices` (or `all`) metric family isn't specified.
|
* @param {String, String[], Boolean} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
|
||||||
|
* @param {Boolean} params.groups - A comma-separated list of search groups for `search` index metric
|
||||||
|
* @param {String} [params.level=node] - Return indices stats aggregated at node, index or shard level
|
||||||
|
* @param {String, String[], Boolean} params.types - A comma-separated list of document types for the `indexing` index metric
|
||||||
|
* @param {String, String[], Boolean} params.metric - Limit the information returned to the specified metrics
|
||||||
|
* @param {String, String[], Boolean} params.indexMetric - Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified.
|
||||||
* @param {String, String[], Boolean} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
|
* @param {String, String[], Boolean} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
|
||||||
*/
|
*/
|
||||||
api.cluster.prototype.nodeStats = ca({
|
api.cluster.prototype.nodeStats = ca({
|
||||||
params: {
|
params: {
|
||||||
|
completionFields: {
|
||||||
|
type: 'list',
|
||||||
|
name: 'completion_fields'
|
||||||
|
},
|
||||||
|
fielddataFields: {
|
||||||
|
type: 'list',
|
||||||
|
name: 'fielddata_fields'
|
||||||
|
},
|
||||||
fields: {
|
fields: {
|
||||||
type: 'list'
|
type: 'list'
|
||||||
|
},
|
||||||
|
groups: {
|
||||||
|
type: 'boolean'
|
||||||
|
},
|
||||||
|
level: {
|
||||||
|
type: 'enum',
|
||||||
|
'default': 'node',
|
||||||
|
options: [
|
||||||
|
'node',
|
||||||
|
'indices',
|
||||||
|
'shards'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
types: {
|
||||||
|
type: 'list'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
urls: [
|
urls: [
|
||||||
{
|
{
|
||||||
fmt: '/_nodes/<%=nodeId%>/stats/<%=metricFamily%>/<%=metric%>',
|
fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>/<%=indexMetric%>',
|
||||||
req: {
|
req: {
|
||||||
nodeId: {
|
nodeId: {
|
||||||
type: 'list'
|
type: 'list'
|
||||||
},
|
},
|
||||||
metricFamily: {
|
metric: {
|
||||||
type: 'enum',
|
type: 'list',
|
||||||
options: [
|
options: [
|
||||||
'all',
|
'_all',
|
||||||
|
'breaker',
|
||||||
'fs',
|
'fs',
|
||||||
'http',
|
'http',
|
||||||
'indices',
|
'indices',
|
||||||
@ -372,9 +401,10 @@ api.cluster.prototype.nodeStats = ca({
|
|||||||
'transport'
|
'transport'
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
metric: {
|
indexMetric: {
|
||||||
type: 'enum',
|
type: 'list',
|
||||||
options: [
|
options: [
|
||||||
|
'_all',
|
||||||
'completion',
|
'completion',
|
||||||
'docs',
|
'docs',
|
||||||
'fielddata',
|
'fielddata',
|
||||||
@ -383,9 +413,11 @@ api.cluster.prototype.nodeStats = ca({
|
|||||||
'get',
|
'get',
|
||||||
'id_cache',
|
'id_cache',
|
||||||
'indexing',
|
'indexing',
|
||||||
'merges',
|
'merge',
|
||||||
|
'percolate',
|
||||||
'refresh',
|
'refresh',
|
||||||
'search',
|
'search',
|
||||||
|
'segments',
|
||||||
'store',
|
'store',
|
||||||
'warmer'
|
'warmer'
|
||||||
]
|
]
|
||||||
@ -393,12 +425,37 @@ api.cluster.prototype.nodeStats = ca({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fmt: '/_nodes/stats/<%=metricFamily%>/<%=metric%>',
|
fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>',
|
||||||
req: {
|
req: {
|
||||||
metricFamily: {
|
nodeId: {
|
||||||
type: 'enum',
|
type: 'list'
|
||||||
|
},
|
||||||
|
metric: {
|
||||||
|
type: 'list',
|
||||||
options: [
|
options: [
|
||||||
'all',
|
'_all',
|
||||||
|
'breaker',
|
||||||
|
'fs',
|
||||||
|
'http',
|
||||||
|
'indices',
|
||||||
|
'jvm',
|
||||||
|
'network',
|
||||||
|
'os',
|
||||||
|
'process',
|
||||||
|
'thread_pool',
|
||||||
|
'transport'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fmt: '/_nodes/stats/<%=metric%>/<%=indexMetric%>',
|
||||||
|
req: {
|
||||||
|
metric: {
|
||||||
|
type: 'list',
|
||||||
|
options: [
|
||||||
|
'_all',
|
||||||
|
'breaker',
|
||||||
'fs',
|
'fs',
|
||||||
'http',
|
'http',
|
||||||
'indices',
|
'indices',
|
||||||
@ -410,9 +467,10 @@ api.cluster.prototype.nodeStats = ca({
|
|||||||
'transport'
|
'transport'
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
metric: {
|
indexMetric: {
|
||||||
type: 'enum',
|
type: 'list',
|
||||||
options: [
|
options: [
|
||||||
|
'_all',
|
||||||
'completion',
|
'completion',
|
||||||
'docs',
|
'docs',
|
||||||
'fielddata',
|
'fielddata',
|
||||||
@ -421,9 +479,11 @@ api.cluster.prototype.nodeStats = ca({
|
|||||||
'get',
|
'get',
|
||||||
'id_cache',
|
'id_cache',
|
||||||
'indexing',
|
'indexing',
|
||||||
'merges',
|
'merge',
|
||||||
|
'percolate',
|
||||||
'refresh',
|
'refresh',
|
||||||
'search',
|
'search',
|
||||||
|
'segments',
|
||||||
'store',
|
'store',
|
||||||
'warmer'
|
'warmer'
|
||||||
]
|
]
|
||||||
@ -438,6 +498,27 @@ api.cluster.prototype.nodeStats = ca({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
fmt: '/_nodes/stats/<%=metric%>',
|
||||||
|
req: {
|
||||||
|
metric: {
|
||||||
|
type: 'list',
|
||||||
|
options: [
|
||||||
|
'_all',
|
||||||
|
'breaker',
|
||||||
|
'fs',
|
||||||
|
'http',
|
||||||
|
'indices',
|
||||||
|
'jvm',
|
||||||
|
'network',
|
||||||
|
'os',
|
||||||
|
'process',
|
||||||
|
'thread_pool',
|
||||||
|
'transport'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
fmt: '/_nodes/stats'
|
fmt: '/_nodes/stats'
|
||||||
}
|
}
|
||||||
@ -491,42 +572,14 @@ api.cluster.prototype.reroute = ca({
|
|||||||
* Perform a [cluster.state](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/cluster-state.html) request
|
* Perform a [cluster.state](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/cluster-state.html) request
|
||||||
*
|
*
|
||||||
* @param {Object} params - An object with parameters used to carry out this action
|
* @param {Object} params - An object with parameters used to carry out this action
|
||||||
* @param {Boolean} params.filterBlocks - Do not return information about blocks
|
|
||||||
* @param {Boolean} params.filterIndexTemplates - Do not return information about index templates
|
|
||||||
* @param {String, String[], Boolean} params.filterIndices - Limit returned metadata information to specific indices
|
|
||||||
* @param {Boolean} params.filterMetadata - Do not return information about indices metadata
|
|
||||||
* @param {Boolean} params.filterNodes - Do not return information about nodes
|
|
||||||
* @param {Boolean} params.filterRoutingTable - Do not return information about shard allocation (`routing_table` and `routing_nodes`)
|
|
||||||
* @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false)
|
* @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false)
|
||||||
* @param {Date, Number} params.masterTimeout - Specify timeout for connection to master
|
* @param {Date, Number} params.masterTimeout - Specify timeout for connection to master
|
||||||
* @param {Boolean} params.flatSettings - Return settings in flat format (default: false)
|
* @param {Boolean} params.flatSettings - Return settings in flat format (default: false)
|
||||||
|
* @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
||||||
|
* @param {String, String[], Boolean} params.metric - Limit the information returned to the specified metrics
|
||||||
*/
|
*/
|
||||||
api.cluster.prototype.state = ca({
|
api.cluster.prototype.state = ca({
|
||||||
params: {
|
params: {
|
||||||
filterBlocks: {
|
|
||||||
type: 'boolean',
|
|
||||||
name: 'filter_blocks'
|
|
||||||
},
|
|
||||||
filterIndexTemplates: {
|
|
||||||
type: 'boolean',
|
|
||||||
name: 'filter_index_templates'
|
|
||||||
},
|
|
||||||
filterIndices: {
|
|
||||||
type: 'list',
|
|
||||||
name: 'filter_indices'
|
|
||||||
},
|
|
||||||
filterMetadata: {
|
|
||||||
type: 'boolean',
|
|
||||||
name: 'filter_metadata'
|
|
||||||
},
|
|
||||||
filterNodes: {
|
|
||||||
type: 'boolean',
|
|
||||||
name: 'filter_nodes'
|
|
||||||
},
|
|
||||||
filterRoutingTable: {
|
|
||||||
type: 'boolean',
|
|
||||||
name: 'filter_routing_table'
|
|
||||||
},
|
|
||||||
local: {
|
local: {
|
||||||
type: 'boolean'
|
type: 'boolean'
|
||||||
},
|
},
|
||||||
@ -539,9 +592,46 @@ api.cluster.prototype.state = ca({
|
|||||||
name: 'flat_settings'
|
name: 'flat_settings'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
url: {
|
urls: [
|
||||||
fmt: '/_cluster/state'
|
{
|
||||||
}
|
fmt: '/_cluster/state/<%=metric%>/<%=index%>',
|
||||||
|
req: {
|
||||||
|
metric: {
|
||||||
|
type: 'list',
|
||||||
|
options: [
|
||||||
|
'_all',
|
||||||
|
'blocks',
|
||||||
|
'index_templates',
|
||||||
|
'metadata',
|
||||||
|
'nodes',
|
||||||
|
'routing_table'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
index: {
|
||||||
|
type: 'list'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fmt: '/_cluster/state/<%=metric%>',
|
||||||
|
req: {
|
||||||
|
metric: {
|
||||||
|
type: 'list',
|
||||||
|
options: [
|
||||||
|
'_all',
|
||||||
|
'blocks',
|
||||||
|
'index_templates',
|
||||||
|
'metadata',
|
||||||
|
'nodes',
|
||||||
|
'routing_table'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fmt: '/_cluster/state'
|
||||||
|
}
|
||||||
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1468,18 +1558,30 @@ api.indices.prototype.deleteAlias = ca({
|
|||||||
name: 'master_timeout'
|
name: 'master_timeout'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
url: {
|
urls: [
|
||||||
fmt: '/<%=index%>/_alias/<%=name%>',
|
{
|
||||||
req: {
|
fmt: '/<%=index%>/_alias/<%=name%>',
|
||||||
index: {
|
req: {
|
||||||
type: 'string'
|
index: {
|
||||||
},
|
type: 'string'
|
||||||
name: {
|
},
|
||||||
type: 'string'
|
name: {
|
||||||
|
type: 'string'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
sortOrder: -2
|
{
|
||||||
},
|
fmt: '/<%=index%>/_aliases/<%=name%>',
|
||||||
|
req: {
|
||||||
|
index: {
|
||||||
|
type: 'string'
|
||||||
|
},
|
||||||
|
name: {
|
||||||
|
type: 'string'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
method: 'DELETE'
|
method: 'DELETE'
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -1498,18 +1600,52 @@ api.indices.prototype.deleteMapping = ca({
|
|||||||
name: 'master_timeout'
|
name: 'master_timeout'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
url: {
|
urls: [
|
||||||
fmt: '/<%=index%>/<%=type%>',
|
{
|
||||||
req: {
|
fmt: '/<%=index%>/<%=type%>',
|
||||||
index: {
|
req: {
|
||||||
type: 'list'
|
index: {
|
||||||
},
|
type: 'list'
|
||||||
type: {
|
},
|
||||||
type: 'string'
|
type: {
|
||||||
|
type: 'string'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
sortOrder: -2
|
{
|
||||||
},
|
fmt: '/<%=index%>/_mapping/<%=type%>',
|
||||||
|
req: {
|
||||||
|
index: {
|
||||||
|
type: 'list'
|
||||||
|
},
|
||||||
|
type: {
|
||||||
|
type: 'string'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fmt: '/<%=index%>/<%=type%>/_mappings',
|
||||||
|
req: {
|
||||||
|
index: {
|
||||||
|
type: 'list'
|
||||||
|
},
|
||||||
|
type: {
|
||||||
|
type: 'string'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fmt: '/<%=index%>/_mappings/<%=type%>',
|
||||||
|
req: {
|
||||||
|
index: {
|
||||||
|
type: 'list'
|
||||||
|
},
|
||||||
|
type: {
|
||||||
|
type: 'string'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
method: 'DELETE'
|
method: 'DELETE'
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -1559,41 +1695,18 @@ api.indices.prototype.deleteWarmer = ca({
|
|||||||
name: 'master_timeout'
|
name: 'master_timeout'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
urls: [
|
url: {
|
||||||
{
|
fmt: '/<%=index%>/_warmer/<%=name%>',
|
||||||
fmt: '/<%=index%>/<%=type%>/_warmer/<%=name%>',
|
req: {
|
||||||
req: {
|
index: {
|
||||||
index: {
|
type: 'list'
|
||||||
type: 'list'
|
},
|
||||||
},
|
name: {
|
||||||
type: {
|
type: 'string'
|
||||||
type: 'list'
|
|
||||||
},
|
|
||||||
name: {
|
|
||||||
type: 'string'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
sortOrder: -2
|
||||||
fmt: '/<%=index%>/_warmer/<%=name%>',
|
},
|
||||||
req: {
|
|
||||||
index: {
|
|
||||||
type: 'list'
|
|
||||||
},
|
|
||||||
name: {
|
|
||||||
type: 'string'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
fmt: '/<%=index%>/_warmer',
|
|
||||||
req: {
|
|
||||||
index: {
|
|
||||||
type: 'list'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
method: 'DELETE'
|
method: 'DELETE'
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -1865,6 +1978,9 @@ api.indices.prototype.getAlias = ca({
|
|||||||
type: 'list'
|
type: 'list'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fmt: '/_alias'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
@ -1875,6 +1991,7 @@ api.indices.prototype.getAlias = ca({
|
|||||||
* @param {Object} params - An object with parameters used to carry out this action
|
* @param {Object} params - An object with parameters used to carry out this action
|
||||||
* @param {Date, Number} params.timeout - Explicit operation timeout
|
* @param {Date, Number} params.timeout - Explicit operation timeout
|
||||||
* @param {String, String[], Boolean} params.index - A comma-separated list of index names to filter aliases
|
* @param {String, String[], Boolean} params.index - A comma-separated list of index names to filter aliases
|
||||||
|
* @param {String, String[], Boolean} params.name - A comma-separated list of alias names to filter
|
||||||
*/
|
*/
|
||||||
api.indices.prototype.getAliases = ca({
|
api.indices.prototype.getAliases = ca({
|
||||||
params: {
|
params: {
|
||||||
@ -1883,6 +2000,17 @@ api.indices.prototype.getAliases = ca({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
urls: [
|
urls: [
|
||||||
|
{
|
||||||
|
fmt: '/<%=index%>/_aliases/<%=name%>',
|
||||||
|
req: {
|
||||||
|
index: {
|
||||||
|
type: 'list'
|
||||||
|
},
|
||||||
|
name: {
|
||||||
|
type: 'list'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
fmt: '/<%=index%>/_aliases',
|
fmt: '/<%=index%>/_aliases',
|
||||||
req: {
|
req: {
|
||||||
@ -1891,6 +2019,14 @@ api.indices.prototype.getAliases = ca({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
fmt: '/_aliases/<%=name%>',
|
||||||
|
req: {
|
||||||
|
name: {
|
||||||
|
type: 'list'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
fmt: '/_aliases'
|
fmt: '/_aliases'
|
||||||
}
|
}
|
||||||
@ -1935,7 +2071,7 @@ api.indices.prototype.getFieldMapping = ca({
|
|||||||
},
|
},
|
||||||
urls: [
|
urls: [
|
||||||
{
|
{
|
||||||
fmt: '/<%=index%>/<%=type%>/_mapping/field/<%=field%>',
|
fmt: '/<%=index%>/_mapping/<%=type%>/field/<%=field%>',
|
||||||
req: {
|
req: {
|
||||||
index: {
|
index: {
|
||||||
type: 'list'
|
type: 'list'
|
||||||
@ -1959,6 +2095,17 @@ api.indices.prototype.getFieldMapping = ca({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
fmt: '/_mapping/<%=type%>/field/<%=field%>',
|
||||||
|
req: {
|
||||||
|
type: {
|
||||||
|
type: 'list'
|
||||||
|
},
|
||||||
|
field: {
|
||||||
|
type: 'list'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
fmt: '/_mapping/field/<%=field%>',
|
fmt: '/_mapping/field/<%=field%>',
|
||||||
req: {
|
req: {
|
||||||
@ -2002,7 +2149,7 @@ api.indices.prototype.getMapping = ca({
|
|||||||
},
|
},
|
||||||
urls: [
|
urls: [
|
||||||
{
|
{
|
||||||
fmt: '/<%=index%>/<%=type%>/_mapping',
|
fmt: '/<%=index%>/_mapping/<%=type%>',
|
||||||
req: {
|
req: {
|
||||||
index: {
|
index: {
|
||||||
type: 'list'
|
type: 'list'
|
||||||
@ -2020,6 +2167,14 @@ api.indices.prototype.getMapping = ca({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
fmt: '/_mapping/<%=type%>',
|
||||||
|
req: {
|
||||||
|
type: {
|
||||||
|
type: 'list'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
fmt: '/_mapping'
|
fmt: '/_mapping'
|
||||||
}
|
}
|
||||||
@ -2036,6 +2191,7 @@ api.indices.prototype.getMapping = ca({
|
|||||||
* @param {String} params.prefix - The prefix all settings must have in order to be included
|
* @param {String} params.prefix - The prefix all settings must have in order to be included
|
||||||
* @param {Boolean} params.flatSettings - Return settings in flat format (default: false)
|
* @param {Boolean} params.flatSettings - Return settings in flat format (default: false)
|
||||||
* @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
* @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
||||||
|
* @param {String} params.name - The name of the settings that should be included
|
||||||
*/
|
*/
|
||||||
api.indices.prototype.getSettings = ca({
|
api.indices.prototype.getSettings = ca({
|
||||||
params: {
|
params: {
|
||||||
@ -2069,12 +2225,12 @@ api.indices.prototype.getSettings = ca({
|
|||||||
},
|
},
|
||||||
urls: [
|
urls: [
|
||||||
{
|
{
|
||||||
fmt: '/<%=index%>/<%=prefix%>/_settings',
|
fmt: '/<%=index%>/_settings/<%=name%>',
|
||||||
req: {
|
req: {
|
||||||
index: {
|
index: {
|
||||||
type: 'list'
|
type: 'list'
|
||||||
},
|
},
|
||||||
prefix: {
|
name: {
|
||||||
type: 'string'
|
type: 'string'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2087,6 +2243,14 @@ api.indices.prototype.getSettings = ca({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
fmt: '/_settings/<%=name%>',
|
||||||
|
req: {
|
||||||
|
name: {
|
||||||
|
type: 'string'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
fmt: '/_settings'
|
fmt: '/_settings'
|
||||||
}
|
}
|
||||||
@ -2186,6 +2350,17 @@ api.indices.prototype.getWarmer = ca({
|
|||||||
type: 'list'
|
type: 'list'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fmt: '/_warmer/<%=name%>',
|
||||||
|
req: {
|
||||||
|
name: {
|
||||||
|
type: 'string'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fmt: '/_warmer'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
@ -2343,6 +2518,17 @@ api.indices.prototype.putAlias = ca({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
fmt: '/<%=index%>/_aliases/<%=name%>',
|
||||||
|
req: {
|
||||||
|
index: {
|
||||||
|
type: 'string'
|
||||||
|
},
|
||||||
|
name: {
|
||||||
|
type: 'string'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
fmt: '/_alias/<%=name%>',
|
fmt: '/_alias/<%=name%>',
|
||||||
req: {
|
req: {
|
||||||
@ -2352,15 +2538,12 @@ api.indices.prototype.putAlias = ca({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fmt: '/<%=index%>/_alias',
|
fmt: '/_aliases/<%=name%>',
|
||||||
req: {
|
req: {
|
||||||
index: {
|
name: {
|
||||||
type: 'string'
|
type: 'string'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
fmt: '/_alias'
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
method: 'PUT'
|
method: 'PUT'
|
||||||
@ -2410,18 +2593,68 @@ api.indices.prototype.putMapping = ca({
|
|||||||
name: 'expand_wildcards'
|
name: 'expand_wildcards'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
url: {
|
urls: [
|
||||||
fmt: '/<%=index%>/<%=type%>/_mapping',
|
{
|
||||||
req: {
|
fmt: '/<%=index%>/<%=type%>/_mapping',
|
||||||
index: {
|
req: {
|
||||||
type: 'list'
|
index: {
|
||||||
},
|
type: 'list'
|
||||||
type: {
|
},
|
||||||
type: 'string'
|
type: {
|
||||||
|
type: 'string'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
sortOrder: -2
|
{
|
||||||
},
|
fmt: '/<%=index%>/_mapping/<%=type%>',
|
||||||
|
req: {
|
||||||
|
index: {
|
||||||
|
type: 'list'
|
||||||
|
},
|
||||||
|
type: {
|
||||||
|
type: 'string'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fmt: '/<%=index%>/<%=type%>/_mappings',
|
||||||
|
req: {
|
||||||
|
index: {
|
||||||
|
type: 'list'
|
||||||
|
},
|
||||||
|
type: {
|
||||||
|
type: 'string'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fmt: '/<%=index%>/_mappings/<%=type%>',
|
||||||
|
req: {
|
||||||
|
index: {
|
||||||
|
type: 'list'
|
||||||
|
},
|
||||||
|
type: {
|
||||||
|
type: 'string'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fmt: '/_mapping/<%=type%>',
|
||||||
|
req: {
|
||||||
|
type: {
|
||||||
|
type: 'string'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fmt: '/_mappings/<%=type%>',
|
||||||
|
req: {
|
||||||
|
type: {
|
||||||
|
type: 'string'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
method: 'PUT'
|
method: 'PUT'
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -2570,6 +2803,20 @@ api.indices.prototype.putWarmer = ca({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
fmt: '/<%=index%>/<%=type%>/_warmers/<%=name%>',
|
||||||
|
req: {
|
||||||
|
index: {
|
||||||
|
type: 'list'
|
||||||
|
},
|
||||||
|
type: {
|
||||||
|
type: 'list'
|
||||||
|
},
|
||||||
|
name: {
|
||||||
|
type: 'string'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
fmt: '/<%=index%>/_warmer/<%=name%>',
|
fmt: '/<%=index%>/_warmer/<%=name%>',
|
||||||
req: {
|
req: {
|
||||||
@ -2580,6 +2827,33 @@ api.indices.prototype.putWarmer = ca({
|
|||||||
type: 'string'
|
type: 'string'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fmt: '/<%=index%>/_warmers/<%=name%>',
|
||||||
|
req: {
|
||||||
|
index: {
|
||||||
|
type: 'list'
|
||||||
|
},
|
||||||
|
name: {
|
||||||
|
type: 'string'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fmt: '/_warmer/<%=name%>',
|
||||||
|
req: {
|
||||||
|
name: {
|
||||||
|
type: 'string'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fmt: '/_warmers/<%=name%>',
|
||||||
|
req: {
|
||||||
|
name: {
|
||||||
|
type: 'string'
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
method: 'PUT'
|
method: 'PUT'
|
||||||
@ -2731,54 +3005,21 @@ api.indices.prototype.snapshotIndex = ca({
|
|||||||
* Perform a [indices.stats](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-stats.html) request
|
* Perform a [indices.stats](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-stats.html) request
|
||||||
*
|
*
|
||||||
* @param {Object} params - An object with parameters used to carry out this action
|
* @param {Object} params - An object with parameters used to carry out this action
|
||||||
* @param {Boolean} params.all - Return all available information
|
* @param {String, String[], Boolean} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
|
||||||
* @param {Boolean} params.clear - Reset the default level of detail
|
* @param {String, String[], Boolean} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards)
|
||||||
* @param {Boolean} params.completion - Return information about completion suggester stats
|
* @param {String, String[], Boolean} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
|
||||||
* @param {String, String[], Boolean} params.completionFields - A comma-separated list of fields for `completion` metric (supports wildcards)
|
* @param {Boolean} params.groups - A comma-separated list of search groups for `search` index metric
|
||||||
* @param {Boolean} params.docs - Return information about indexed and deleted documents
|
* @param {String} [params.level=indices] - Return stats aggregated at cluster, index or shard level
|
||||||
* @param {Boolean} params.fielddata - Return information about field data
|
* @param {String, String[], Boolean} params.types - A comma-separated list of document types for the `indexing` index metric
|
||||||
* @param {String, String[], Boolean} params.fielddataFields - A comma-separated list of fields for `fielddata` metric (supports wildcards)
|
|
||||||
* @param {String, String[], Boolean} params.fields - A comma-separated list of fields to return detailed information for, when returning the `search` statistics
|
|
||||||
* @param {Boolean} params.filterCache - Return information about filter cache
|
|
||||||
* @param {Boolean} params.flush - Return information about flush operations
|
|
||||||
* @param {Boolean} params.get - Return information about get operations
|
|
||||||
* @param {Boolean} params.groups - A comma-separated list of search groups for `search` statistics
|
|
||||||
* @param {Boolean} params.idCache - Return information about ID cache
|
|
||||||
* @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 {Boolean} params.indexing - Return information about indexing operations
|
|
||||||
* @param {Boolean} params.merge - Return information about merge operations
|
|
||||||
* @param {Boolean} params.refresh - Return information about refresh operations
|
|
||||||
* @param {Boolean} params.search - Return information about search operations; use the `groups` parameter to include information for specific search groups
|
|
||||||
* @param {Boolean} params.store - Return information about the size of the index
|
|
||||||
* @param {Boolean} params.warmer - Return information about warmers
|
|
||||||
* @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
* @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
||||||
* @param {String, String[], Boolean} params.indexingTypes - A comma-separated list of document types to include in the `indexing` statistics
|
* @param {String, String[], Boolean} params.metric - Limit the information returned the specific metrics.
|
||||||
* @param {String} params.metricFamily - Limit the information returned to a specific metric
|
|
||||||
* @param {String, String[], Boolean} params.searchGroups - A comma-separated list of search groups to include in the `search` statistics
|
|
||||||
*/
|
*/
|
||||||
api.indices.prototype.stats = ca({
|
api.indices.prototype.stats = ca({
|
||||||
params: {
|
params: {
|
||||||
all: {
|
|
||||||
type: 'boolean'
|
|
||||||
},
|
|
||||||
clear: {
|
|
||||||
type: 'boolean'
|
|
||||||
},
|
|
||||||
completion: {
|
|
||||||
type: 'boolean'
|
|
||||||
},
|
|
||||||
completionFields: {
|
completionFields: {
|
||||||
type: 'list',
|
type: 'list',
|
||||||
name: 'completion_fields'
|
name: 'completion_fields'
|
||||||
},
|
},
|
||||||
docs: {
|
|
||||||
type: 'boolean'
|
|
||||||
},
|
|
||||||
fielddata: {
|
|
||||||
type: 'boolean'
|
|
||||||
},
|
|
||||||
fielddataFields: {
|
fielddataFields: {
|
||||||
type: 'list',
|
type: 'list',
|
||||||
name: 'fielddata_fields'
|
name: 'fielddata_fields'
|
||||||
@ -2786,60 +3027,78 @@ api.indices.prototype.stats = ca({
|
|||||||
fields: {
|
fields: {
|
||||||
type: 'list'
|
type: 'list'
|
||||||
},
|
},
|
||||||
filterCache: {
|
|
||||||
type: 'boolean',
|
|
||||||
name: 'filter_cache'
|
|
||||||
},
|
|
||||||
flush: {
|
|
||||||
type: 'boolean'
|
|
||||||
},
|
|
||||||
get: {
|
|
||||||
type: 'boolean'
|
|
||||||
},
|
|
||||||
groups: {
|
groups: {
|
||||||
type: 'boolean'
|
type: 'boolean'
|
||||||
},
|
},
|
||||||
idCache: {
|
level: {
|
||||||
type: 'boolean',
|
|
||||||
name: 'id_cache'
|
|
||||||
},
|
|
||||||
ignoreUnavailable: {
|
|
||||||
type: 'boolean',
|
|
||||||
name: 'ignore_unavailable'
|
|
||||||
},
|
|
||||||
allowNoIndices: {
|
|
||||||
type: 'boolean',
|
|
||||||
name: 'allow_no_indices'
|
|
||||||
},
|
|
||||||
expandWildcards: {
|
|
||||||
type: 'enum',
|
type: 'enum',
|
||||||
'default': 'open',
|
'default': 'indices',
|
||||||
options: [
|
options: [
|
||||||
'open',
|
'cluster',
|
||||||
'closed'
|
'indices',
|
||||||
],
|
'shards'
|
||||||
name: 'expand_wildcards'
|
]
|
||||||
},
|
},
|
||||||
indexing: {
|
types: {
|
||||||
type: 'boolean'
|
type: 'list'
|
||||||
},
|
|
||||||
merge: {
|
|
||||||
type: 'boolean'
|
|
||||||
},
|
|
||||||
refresh: {
|
|
||||||
type: 'boolean'
|
|
||||||
},
|
|
||||||
search: {
|
|
||||||
type: 'boolean'
|
|
||||||
},
|
|
||||||
store: {
|
|
||||||
type: 'boolean'
|
|
||||||
},
|
|
||||||
warmer: {
|
|
||||||
type: 'boolean'
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
urls: [
|
urls: [
|
||||||
|
{
|
||||||
|
fmt: '/<%=index%>/_stats/<%=metric%>',
|
||||||
|
req: {
|
||||||
|
index: {
|
||||||
|
type: 'list'
|
||||||
|
},
|
||||||
|
metric: {
|
||||||
|
type: 'list',
|
||||||
|
options: [
|
||||||
|
'_all',
|
||||||
|
'completion',
|
||||||
|
'docs',
|
||||||
|
'fielddata',
|
||||||
|
'filter_cache',
|
||||||
|
'flush',
|
||||||
|
'get',
|
||||||
|
'id_cache',
|
||||||
|
'indexing',
|
||||||
|
'merge',
|
||||||
|
'percolate',
|
||||||
|
'refresh',
|
||||||
|
'search',
|
||||||
|
'segments',
|
||||||
|
'store',
|
||||||
|
'warmer'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fmt: '/_stats/<%=metric%>',
|
||||||
|
req: {
|
||||||
|
metric: {
|
||||||
|
type: 'list',
|
||||||
|
options: [
|
||||||
|
'_all',
|
||||||
|
'completion',
|
||||||
|
'docs',
|
||||||
|
'fielddata',
|
||||||
|
'filter_cache',
|
||||||
|
'flush',
|
||||||
|
'get',
|
||||||
|
'id_cache',
|
||||||
|
'indexing',
|
||||||
|
'merge',
|
||||||
|
'percolate',
|
||||||
|
'refresh',
|
||||||
|
'search',
|
||||||
|
'segments',
|
||||||
|
'store',
|
||||||
|
'warmer'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
fmt: '/<%=index%>/_stats',
|
fmt: '/<%=index%>/_stats',
|
||||||
req: {
|
req: {
|
||||||
@ -3092,10 +3351,10 @@ api.mget = ca({
|
|||||||
* @param {Number} params.boostTerms - The boost factor
|
* @param {Number} params.boostTerms - The boost factor
|
||||||
* @param {Number} params.maxDocFreq - The word occurrence frequency as count: words with higher occurrence in the corpus will be ignored
|
* @param {Number} params.maxDocFreq - The word occurrence frequency as count: words with higher occurrence in the corpus will be ignored
|
||||||
* @param {Number} params.maxQueryTerms - The maximum query terms to be included in the generated query
|
* @param {Number} params.maxQueryTerms - The maximum query terms to be included in the generated query
|
||||||
* @param {Number} params.maxWordLen - The minimum length of the word: longer words will be ignored
|
* @param {Number} params.maxWordLength - The minimum length of the word: longer words will be ignored
|
||||||
* @param {Number} params.minDocFreq - The word occurrence frequency as count: words with lower occurrence in the corpus will be ignored
|
* @param {Number} params.minDocFreq - The word occurrence frequency as count: words with lower occurrence in the corpus will be ignored
|
||||||
* @param {Number} params.minTermFreq - The term frequency as percent: terms with lower occurence in the source document will be ignored
|
* @param {Number} params.minTermFreq - The term frequency as percent: terms with lower occurence in the source document will be ignored
|
||||||
* @param {Number} params.minWordLen - The minimum length of the word: shorter words will be ignored
|
* @param {Number} params.minWordLength - The minimum length of the word: shorter words will be ignored
|
||||||
* @param {String, String[], Boolean} params.mltFields - Specific fields to perform the query against
|
* @param {String, String[], Boolean} params.mltFields - Specific fields to perform the query against
|
||||||
* @param {Number} params.percentTermsToMatch - How many terms have to match in order to consider the document a match (default: 0.3)
|
* @param {Number} params.percentTermsToMatch - How many terms have to match in order to consider the document a match (default: 0.3)
|
||||||
* @param {String} params.routing - Specific routing value
|
* @param {String} params.routing - Specific routing value
|
||||||
@ -3126,9 +3385,9 @@ api.mlt = ca({
|
|||||||
type: 'number',
|
type: 'number',
|
||||||
name: 'max_query_terms'
|
name: 'max_query_terms'
|
||||||
},
|
},
|
||||||
maxWordLen: {
|
maxWordLength: {
|
||||||
type: 'number',
|
type: 'number',
|
||||||
name: 'max_word_len'
|
name: 'max_word_length'
|
||||||
},
|
},
|
||||||
minDocFreq: {
|
minDocFreq: {
|
||||||
type: 'number',
|
type: 'number',
|
||||||
@ -3138,9 +3397,9 @@ api.mlt = ca({
|
|||||||
type: 'number',
|
type: 'number',
|
||||||
name: 'min_term_freq'
|
name: 'min_term_freq'
|
||||||
},
|
},
|
||||||
minWordLen: {
|
minWordLength: {
|
||||||
type: 'number',
|
type: 'number',
|
||||||
name: 'min_word_len'
|
name: 'min_word_length'
|
||||||
},
|
},
|
||||||
mltFields: {
|
mltFields: {
|
||||||
type: 'list',
|
type: 'list',
|
||||||
|
|||||||
6
src/lib/connectors/angular.js
vendored
6
src/lib/connectors/angular.js
vendored
@ -29,7 +29,11 @@ AngularConnector.prototype.request = function (params, cb) {
|
|||||||
}).then(function (response) {
|
}).then(function (response) {
|
||||||
cb(null, response.data, response.status, response.headers());
|
cb(null, response.data, response.status, response.headers());
|
||||||
}, function (err) {
|
}, function (err) {
|
||||||
cb(new ConnectionFault(err.message));
|
if (err.status) {
|
||||||
|
cb(null, err.data, err.status, err.headers());
|
||||||
|
} else {
|
||||||
|
cb(new ConnectionFault(err.message));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return function () {
|
return function () {
|
||||||
|
|||||||
@ -39,7 +39,9 @@ function HttpConnector(host, config) {
|
|||||||
maxKeepAliveTime: 3e5 // 5 minutes
|
maxKeepAliveTime: 3e5 // 5 minutes
|
||||||
});
|
});
|
||||||
|
|
||||||
this.agent = new KeepAliveAgent({
|
var KeepAliveAgent_ = this.host.protocol === 'https' ? KeepAliveAgent.HttpsAgent : KeepAliveAgent;
|
||||||
|
|
||||||
|
this.agent = new KeepAliveAgent_({
|
||||||
maxSockets: config.maxSockets,
|
maxSockets: config.maxSockets,
|
||||||
maxKeepAliveRequests: config.maxKeepAliveRequests,
|
maxKeepAliveRequests: config.maxKeepAliveRequests,
|
||||||
maxKeepAliveTime: config.maxKeepAliveTime
|
maxKeepAliveTime: config.maxKeepAliveTime
|
||||||
|
|||||||
@ -9,8 +9,7 @@ if (BROWSER) {
|
|||||||
}
|
}
|
||||||
var argv = require('./argv');
|
var argv = require('./argv');
|
||||||
var server = require('./server');
|
var server = require('./server');
|
||||||
// var path = require('path');
|
var fs = require('relative-fs').relativeTo(require('path').join(__dirname, '../../../'));
|
||||||
// var fs = require('fs');
|
|
||||||
var _ = require('../../../src/lib/utils');
|
var _ = require('../../../src/lib/utils');
|
||||||
|
|
||||||
// current client
|
// current client
|
||||||
@ -65,10 +64,15 @@ module.exports = {
|
|||||||
: 'stdio',
|
: 'stdio',
|
||||||
level: VERBOSE
|
level: VERBOSE
|
||||||
? 'trace'
|
? 'trace'
|
||||||
: 'warning',
|
: 'warning'
|
||||||
path: VERBOSE ? undefined : false
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (logConfig && logConfig.type === 'tracer') {
|
||||||
|
try {
|
||||||
|
fs.unlinkSync('../../../elasticsearch-tracer.log');
|
||||||
|
} catch (e) {}
|
||||||
|
}
|
||||||
|
|
||||||
// close existing client
|
// close existing client
|
||||||
if (client) {
|
if (client) {
|
||||||
client.close();
|
client.close();
|
||||||
|
|||||||
@ -8,6 +8,7 @@ describe('Http Connector', function () {
|
|||||||
var nock = require('nock');
|
var nock = require('nock');
|
||||||
var sinon = require('sinon');
|
var sinon = require('sinon');
|
||||||
var util = require('util');
|
var util = require('util');
|
||||||
|
var KeepAliveAgent = require('agentkeepalive');
|
||||||
|
|
||||||
var http = require('http');
|
var http = require('http');
|
||||||
var https = require('https');
|
var https = require('https');
|
||||||
@ -55,8 +56,8 @@ describe('Http Connector', function () {
|
|||||||
// requestTimeout
|
// requestTimeout
|
||||||
});
|
});
|
||||||
|
|
||||||
it('expects one the host to have a protocol of http or https', function () {
|
it('expects the host to have a protocol of http or https', function () {
|
||||||
expect(function () {
|
(function () {
|
||||||
var con = new HttpConnection(new Host('thrifty://es.com/stuff'));
|
var con = new HttpConnection(new Host('thrifty://es.com/stuff'));
|
||||||
}).to.throwError(/invalid protocol/i);
|
}).to.throwError(/invalid protocol/i);
|
||||||
});
|
});
|
||||||
@ -171,8 +172,9 @@ describe('Http Connector', function () {
|
|||||||
it('calls http based on the host', function (done) {
|
it('calls http based on the host', function (done) {
|
||||||
var con = new HttpConnection(new Host('http://google.com'));
|
var con = new HttpConnection(new Host('http://google.com'));
|
||||||
con.request({}, function () {
|
con.request({}, function () {
|
||||||
expect(http.request.callCount).to.eql(1);
|
http.request.callCount.should.eql(1);
|
||||||
expect(https.request.callCount).to.eql(0);
|
https.request.callCount.should.eql(0);
|
||||||
|
http.request.lastCall.args[0].agent.should.be.an.instanceOf(KeepAliveAgent);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -180,8 +182,9 @@ describe('Http Connector', function () {
|
|||||||
it('calls https based on the host', function (done) {
|
it('calls https based on the host', function (done) {
|
||||||
var con = new HttpConnection(new Host('https://google.com'));
|
var con = new HttpConnection(new Host('https://google.com'));
|
||||||
con.request({}, function () {
|
con.request({}, function () {
|
||||||
expect(http.request.callCount).to.eql(0);
|
http.request.callCount.should.eql(0);
|
||||||
expect(https.request.callCount).to.eql(1);
|
https.request.callCount.should.eql(1);
|
||||||
|
https.request.lastCall.args[0].agent.should.be.an.instanceOf(KeepAliveAgent.HttpsAgent);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user