added plugin support
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
/* jshint maxlen: false */
|
||||
|
||||
var ca = require('../client_action');
|
||||
var ca = require('../client_action').factory;
|
||||
var proxy = require('../client_action').proxyFactory;
|
||||
var namespace = require('../client_action').namespaceFactory;
|
||||
var api = module.exports = {};
|
||||
|
||||
api._namespaces = ['cluster', 'indices'];
|
||||
@ -91,9 +93,7 @@ api.clearScroll = ca({
|
||||
method: 'DELETE'
|
||||
});
|
||||
|
||||
api.cluster = function ClusterNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.cluster = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [cluster.getSettings](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/cluster-update-settings.html) request
|
||||
@ -1145,9 +1145,7 @@ api.index = ca({
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
api.indices = function IndicesNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.indices = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [indices.analyze](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-analyze.html) request
|
||||
@ -3263,7 +3261,7 @@ api.update = ca({
|
||||
* @param {String} params.index - The name of the index
|
||||
* @param {String} params.type - The type of the document
|
||||
*/
|
||||
api.create = ca.proxy(api.index, {
|
||||
api.create = proxy(api.index, {
|
||||
transform: function (params) {
|
||||
params.op_type = 'create';
|
||||
}
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
/* jshint maxlen: false */
|
||||
|
||||
var ca = require('../client_action');
|
||||
var ca = require('../client_action').factory;
|
||||
var proxy = require('../client_action').proxyFactory;
|
||||
var namespace = require('../client_action').namespaceFactory;
|
||||
var api = module.exports = {};
|
||||
|
||||
api._namespaces = ['cat', 'cluster', 'indices', 'nodes', 'snapshot'];
|
||||
@ -77,9 +79,7 @@ api.bulk = ca({
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
api.cat = function CatNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.cat = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [cat.aliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat.html) request
|
||||
@ -630,9 +630,7 @@ api.clearScroll = ca({
|
||||
method: 'DELETE'
|
||||
});
|
||||
|
||||
api.cluster = function ClusterNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.cluster = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [cluster.getSettings](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-update-settings.html) request
|
||||
@ -1666,9 +1664,7 @@ api.index = ca({
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
api.indices = function IndicesNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.indices = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [indices.analyze](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-analyze.html) request
|
||||
@ -3989,9 +3985,7 @@ api.mtermvectors = ca({
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
api.nodes = function NodesNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.nodes = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [nodes.hotThreads](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-nodes-hot-threads.html) request
|
||||
@ -4754,9 +4748,7 @@ api.searchShards = ca({
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
api.snapshot = function SnapshotNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.snapshot = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [snapshot.create](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/modules-snapshots.html) request
|
||||
@ -5231,7 +5223,7 @@ api.update = ca({
|
||||
* @param {String} params.index - The name of the index
|
||||
* @param {String} params.type - The type of the document
|
||||
*/
|
||||
api.create = ca.proxy(api.index, {
|
||||
api.create = proxy(api.index, {
|
||||
transform: function (params) {
|
||||
params.op_type = 'create';
|
||||
}
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
/* jshint maxlen: false */
|
||||
|
||||
var ca = require('../client_action');
|
||||
var ca = require('../client_action').factory;
|
||||
var proxy = require('../client_action').proxyFactory;
|
||||
var namespace = require('../client_action').namespaceFactory;
|
||||
var api = module.exports = {};
|
||||
|
||||
api._namespaces = ['cat', 'cluster', 'indices', 'nodes', 'snapshot'];
|
||||
@ -77,9 +79,7 @@ api.bulk = ca({
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
api.cat = function CatNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.cat = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [cat.aliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat.html) request
|
||||
@ -662,9 +662,7 @@ api.clearScroll = ca({
|
||||
method: 'DELETE'
|
||||
});
|
||||
|
||||
api.cluster = function ClusterNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.cluster = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [cluster.getSettings](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-update-settings.html) request
|
||||
@ -1712,9 +1710,7 @@ api.index = ca({
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
api.indices = function IndicesNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.indices = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [indices.analyze](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-analyze.html) request
|
||||
@ -4084,9 +4080,7 @@ api.mtermvectors = ca({
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
api.nodes = function NodesNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.nodes = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [nodes.hotThreads](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-nodes-hot-threads.html) request
|
||||
@ -4886,9 +4880,7 @@ api.searchShards = ca({
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
api.snapshot = function SnapshotNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.snapshot = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [snapshot.create](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/modules-snapshots.html) request
|
||||
@ -5406,7 +5398,7 @@ api.update = ca({
|
||||
* @param {String} params.index - The name of the index
|
||||
* @param {String} params.type - The type of the document
|
||||
*/
|
||||
api.create = ca.proxy(api.index, {
|
||||
api.create = proxy(api.index, {
|
||||
transform: function (params) {
|
||||
params.op_type = 'create';
|
||||
}
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
/* jshint maxlen: false */
|
||||
|
||||
var ca = require('../client_action');
|
||||
var ca = require('../client_action').factory;
|
||||
var proxy = require('../client_action').proxyFactory;
|
||||
var namespace = require('../client_action').namespaceFactory;
|
||||
var api = module.exports = {};
|
||||
|
||||
api._namespaces = ['cat', 'cluster', 'indices', 'nodes', 'snapshot'];
|
||||
@ -77,9 +79,7 @@ api.bulk = ca({
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
api.cat = function CatNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.cat = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [cat.aliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat.html) request
|
||||
@ -722,9 +722,7 @@ api.clearScroll = ca({
|
||||
method: 'DELETE'
|
||||
});
|
||||
|
||||
api.cluster = function ClusterNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.cluster = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [cluster.getSettings](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-update-settings.html) request
|
||||
@ -1767,9 +1765,7 @@ api.index = ca({
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
api.indices = function IndicesNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.indices = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [indices.analyze](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-analyze.html) request
|
||||
@ -4096,9 +4092,7 @@ api.mtermvectors = ca({
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
api.nodes = function NodesNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.nodes = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [nodes.hotThreads](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-nodes-hot-threads.html) request
|
||||
@ -4947,9 +4941,7 @@ api.searchTemplate = ca({
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
api.snapshot = function SnapshotNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.snapshot = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [snapshot.create](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/modules-snapshots.html) request
|
||||
@ -5465,7 +5457,7 @@ api.update = ca({
|
||||
* @param {String} params.index - The name of the index
|
||||
* @param {String} params.type - The type of the document
|
||||
*/
|
||||
api.create = ca.proxy(api.index, {
|
||||
api.create = proxy(api.index, {
|
||||
transform: function (params) {
|
||||
params.op_type = 'create';
|
||||
}
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
/* jshint maxlen: false */
|
||||
|
||||
var ca = require('../client_action');
|
||||
var ca = require('../client_action').factory;
|
||||
var proxy = require('../client_action').proxyFactory;
|
||||
var namespace = require('../client_action').namespaceFactory;
|
||||
var api = module.exports = {};
|
||||
|
||||
api._namespaces = ['cat', 'cluster', 'indices', 'nodes', 'snapshot'];
|
||||
@ -77,9 +79,7 @@ api.bulk = ca({
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
api.cat = function CatNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.cat = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [cat.aliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat.html) request
|
||||
@ -760,9 +760,7 @@ api.clearScroll = ca({
|
||||
method: 'DELETE'
|
||||
});
|
||||
|
||||
api.cluster = function ClusterNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.cluster = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [cluster.getSettings](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.3/cluster-update-settings.html) request
|
||||
@ -1883,9 +1881,7 @@ api.index = ca({
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
api.indices = function IndicesNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.indices = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [indices.analyze](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.3/indices-analyze.html) request
|
||||
@ -4217,9 +4213,7 @@ api.mtermvectors = ca({
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
api.nodes = function NodesNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.nodes = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [nodes.hotThreads](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.3/cluster-nodes-hot-threads.html) request
|
||||
@ -5115,9 +5109,7 @@ api.searchTemplate = ca({
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
api.snapshot = function SnapshotNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.snapshot = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [snapshot.create](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.3/modules-snapshots.html) request
|
||||
@ -5633,7 +5625,7 @@ api.update = ca({
|
||||
* @param {String} params.index - The name of the index
|
||||
* @param {String} params.type - The type of the document
|
||||
*/
|
||||
api.create = ca.proxy(api.index, {
|
||||
api.create = proxy(api.index, {
|
||||
transform: function (params) {
|
||||
params.op_type = 'create';
|
||||
}
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
/* jshint maxlen: false */
|
||||
|
||||
var ca = require('../client_action');
|
||||
var ca = require('../client_action').factory;
|
||||
var proxy = require('../client_action').proxyFactory;
|
||||
var namespace = require('../client_action').namespaceFactory;
|
||||
var api = module.exports = {};
|
||||
|
||||
api._namespaces = ['cat', 'cluster', 'indices', 'nodes', 'snapshot'];
|
||||
@ -77,9 +79,7 @@ api.bulk = ca({
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
api.cat = function CatNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.cat = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [cat.aliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat.html) request
|
||||
@ -760,9 +760,7 @@ api.clearScroll = ca({
|
||||
method: 'DELETE'
|
||||
});
|
||||
|
||||
api.cluster = function ClusterNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.cluster = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [cluster.getSettings](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.4/cluster-update-settings.html) request
|
||||
@ -1969,9 +1967,7 @@ api.index = ca({
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
api.indices = function IndicesNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.indices = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [indices.analyze](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.4/indices-analyze.html) request
|
||||
@ -4537,9 +4533,7 @@ api.mtermvectors = ca({
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
api.nodes = function NodesNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.nodes = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [nodes.hotThreads](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.4/cluster-nodes-hot-threads.html) request
|
||||
@ -5615,9 +5609,7 @@ api.searchTemplate = ca({
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
api.snapshot = function SnapshotNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.snapshot = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [snapshot.create](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.4/modules-snapshots.html) request
|
||||
@ -6194,7 +6186,7 @@ api.update = ca({
|
||||
* @param {String} params.index - The name of the index
|
||||
* @param {String} params.type - The type of the document
|
||||
*/
|
||||
api.create = ca.proxy(api.index, {
|
||||
api.create = proxy(api.index, {
|
||||
transform: function (params) {
|
||||
params.op_type = 'create';
|
||||
}
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
/* jshint maxlen: false */
|
||||
|
||||
var ca = require('../client_action');
|
||||
var ca = require('../client_action').factory;
|
||||
var proxy = require('../client_action').proxyFactory;
|
||||
var namespace = require('../client_action').namespaceFactory;
|
||||
var api = module.exports = {};
|
||||
|
||||
api._namespaces = ['cat', 'cluster', 'indices', 'nodes', 'snapshot'];
|
||||
@ -77,9 +79,7 @@ api.bulk = ca({
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
api.cat = function CatNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.cat = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [cat.aliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat.html) request
|
||||
@ -760,9 +760,7 @@ api.clearScroll = ca({
|
||||
method: 'DELETE'
|
||||
});
|
||||
|
||||
api.cluster = function ClusterNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.cluster = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [cluster.getSettings](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-update-settings.html) request
|
||||
@ -2000,9 +1998,7 @@ api.index = ca({
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
api.indices = function IndicesNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.indices = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [indices.analyze](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-analyze.html) request
|
||||
@ -4570,9 +4566,7 @@ api.mtermvectors = ca({
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
api.nodes = function NodesNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.nodes = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [nodes.hotThreads](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-nodes-hot-threads.html) request
|
||||
@ -5648,9 +5642,7 @@ api.searchTemplate = ca({
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
api.snapshot = function SnapshotNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.snapshot = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [snapshot.create](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/modules-snapshots.html) request
|
||||
@ -6219,7 +6211,7 @@ api.update = ca({
|
||||
* @param {String} params.index - The name of the index
|
||||
* @param {String} params.type - The type of the document
|
||||
*/
|
||||
api.create = ca.proxy(api.index, {
|
||||
api.create = proxy(api.index, {
|
||||
transform: function (params) {
|
||||
params.op_type = 'create';
|
||||
}
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
/* jshint maxlen: false */
|
||||
|
||||
var ca = require('../client_action');
|
||||
var ca = require('../client_action').factory;
|
||||
var proxy = require('../client_action').proxyFactory;
|
||||
var namespace = require('../client_action').namespaceFactory;
|
||||
var api = module.exports = {};
|
||||
|
||||
api._namespaces = ['cat', 'cluster', 'indices', 'nodes', 'snapshot'];
|
||||
@ -77,9 +79,7 @@ api.bulk = ca({
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
api.cat = function CatNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.cat = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [cat.aliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat.html) request
|
||||
@ -760,9 +760,7 @@ api.clearScroll = ca({
|
||||
method: 'DELETE'
|
||||
});
|
||||
|
||||
api.cluster = function ClusterNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.cluster = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [cluster.getSettings](http://www.elastic.co/guide/en/elasticsearch/reference/1.x/cluster-update-settings.html) request
|
||||
@ -1095,6 +1093,13 @@ api.cluster.prototype.stats = ca({
|
||||
* @param {Number} params.minScore - Include only documents with a specific `_score` value in the result
|
||||
* @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 {String} params.q - Query in the Lucene query string syntax
|
||||
* @param {String} params.analyzer - The analyzer to use for the query string
|
||||
* @param {Boolean} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
|
||||
* @param {String} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
|
||||
* @param {String} params.df - The field to use as default where no field prefix is given in the query string
|
||||
* @param {Boolean} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
|
||||
* @param {Boolean} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
|
||||
* @param {String, String[], Boolean} params.index - A comma-separated list of indices to restrict the results
|
||||
* @param {String, String[], Boolean} params.type - A comma-separated list of types to restrict the results
|
||||
*/
|
||||
@ -1128,6 +1133,35 @@ api.count = ca({
|
||||
},
|
||||
routing: {
|
||||
type: 'string'
|
||||
},
|
||||
q: {
|
||||
type: 'string'
|
||||
},
|
||||
analyzer: {
|
||||
type: 'string'
|
||||
},
|
||||
analyzeWildcard: {
|
||||
type: 'boolean',
|
||||
name: 'analyze_wildcard'
|
||||
},
|
||||
defaultOperator: {
|
||||
type: 'enum',
|
||||
'default': 'OR',
|
||||
options: [
|
||||
'AND',
|
||||
'OR'
|
||||
],
|
||||
name: 'default_operator'
|
||||
},
|
||||
df: {
|
||||
type: 'string'
|
||||
},
|
||||
lenient: {
|
||||
type: 'boolean'
|
||||
},
|
||||
lowercaseExpandedTerms: {
|
||||
type: 'boolean',
|
||||
name: 'lowercase_expanded_terms'
|
||||
}
|
||||
},
|
||||
urls: [
|
||||
@ -2046,9 +2080,7 @@ api.index = ca({
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
api.indices = function IndicesNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.indices = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [indices.analyze](http://www.elastic.co/guide/en/elasticsearch/reference/1.x/indices-analyze.html) request
|
||||
@ -4123,6 +4155,12 @@ api.indices.prototype.upgrade = ca({
|
||||
* @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
||||
* @param {Anything} params.operationThreading - TODO: ?
|
||||
* @param {String} params.q - Query in the Lucene query string syntax
|
||||
* @param {String} params.analyzer - The analyzer to use for the query string
|
||||
* @param {Boolean} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
|
||||
* @param {String} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
|
||||
* @param {String} params.df - The field to use as default where no field prefix is given in the query string
|
||||
* @param {Boolean} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
|
||||
* @param {Boolean} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
|
||||
* @param {String, String[], Boolean} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
|
||||
* @param {String, String[], Boolean} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
|
||||
*/
|
||||
@ -4155,6 +4193,32 @@ api.indices.prototype.validateQuery = ca({
|
||||
},
|
||||
q: {
|
||||
type: 'string'
|
||||
},
|
||||
analyzer: {
|
||||
type: 'string'
|
||||
},
|
||||
analyzeWildcard: {
|
||||
type: 'boolean',
|
||||
name: 'analyze_wildcard'
|
||||
},
|
||||
defaultOperator: {
|
||||
type: 'enum',
|
||||
'default': 'OR',
|
||||
options: [
|
||||
'AND',
|
||||
'OR'
|
||||
],
|
||||
name: 'default_operator'
|
||||
},
|
||||
df: {
|
||||
type: 'string'
|
||||
},
|
||||
lenient: {
|
||||
type: 'boolean'
|
||||
},
|
||||
lowercaseExpandedTerms: {
|
||||
type: 'boolean',
|
||||
name: 'lowercase_expanded_terms'
|
||||
}
|
||||
},
|
||||
urls: [
|
||||
@ -4593,9 +4657,7 @@ api.mtermvectors = ca({
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
api.nodes = function NodesNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.nodes = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [nodes.hotThreads](http://www.elastic.co/guide/en/elasticsearch/reference/1.x/cluster-nodes-hot-threads.html) request
|
||||
@ -5429,6 +5491,13 @@ api.search = ca({
|
||||
* @param {Number} params.minScore - Include only documents with a specific `_score` value in the result
|
||||
* @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 {String} params.q - Query in the Lucene query string syntax
|
||||
* @param {String} params.analyzer - The analyzer to use for the query string
|
||||
* @param {Boolean} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
|
||||
* @param {String} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
|
||||
* @param {String} params.df - The field to use as default where no field prefix is given in the query string
|
||||
* @param {Boolean} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
|
||||
* @param {Boolean} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
|
||||
* @param {String, String[], Boolean} params.index - A comma-separated list of indices to restrict the results
|
||||
* @param {String, String[], Boolean} params.type - A comma-separated list of types to restrict the results
|
||||
*/
|
||||
@ -5462,6 +5531,35 @@ api.searchExists = ca({
|
||||
},
|
||||
routing: {
|
||||
type: 'string'
|
||||
},
|
||||
q: {
|
||||
type: 'string'
|
||||
},
|
||||
analyzer: {
|
||||
type: 'string'
|
||||
},
|
||||
analyzeWildcard: {
|
||||
type: 'boolean',
|
||||
name: 'analyze_wildcard'
|
||||
},
|
||||
defaultOperator: {
|
||||
type: 'enum',
|
||||
'default': 'OR',
|
||||
options: [
|
||||
'AND',
|
||||
'OR'
|
||||
],
|
||||
name: 'default_operator'
|
||||
},
|
||||
df: {
|
||||
type: 'string'
|
||||
},
|
||||
lenient: {
|
||||
type: 'boolean'
|
||||
},
|
||||
lowercaseExpandedTerms: {
|
||||
type: 'boolean',
|
||||
name: 'lowercase_expanded_terms'
|
||||
}
|
||||
},
|
||||
urls: [
|
||||
@ -5646,9 +5744,7 @@ api.searchTemplate = ca({
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
api.snapshot = function SnapshotNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.snapshot = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [snapshot.create](http://www.elastic.co/guide/en/elasticsearch/reference/1.x/modules-snapshots.html) request
|
||||
@ -6209,7 +6305,7 @@ api.update = ca({
|
||||
* @param {String} params.index - The name of the index
|
||||
* @param {String} params.type - The type of the document
|
||||
*/
|
||||
api.create = ca.proxy(api.index, {
|
||||
api.create = proxy(api.index, {
|
||||
transform: function (params) {
|
||||
params.op_type = 'create';
|
||||
}
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
/* jshint maxlen: false */
|
||||
|
||||
var ca = require('../client_action');
|
||||
var ca = require('../client_action').factory;
|
||||
var proxy = require('../client_action').proxyFactory;
|
||||
var namespace = require('../client_action').namespaceFactory;
|
||||
var api = module.exports = {};
|
||||
|
||||
api._namespaces = ['cat', 'cluster', 'indices', 'nodes', 'snapshot'];
|
||||
@ -68,9 +70,7 @@ api.bulk = ca({
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
api.cat = function CatNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.cat = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [cat.aliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat.html) request
|
||||
@ -751,9 +751,7 @@ api.clearScroll = ca({
|
||||
method: 'DELETE'
|
||||
});
|
||||
|
||||
api.cluster = function ClusterNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.cluster = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [cluster.getSettings](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html) request
|
||||
@ -1086,6 +1084,13 @@ api.cluster.prototype.stats = ca({
|
||||
* @param {Number} params.minScore - Include only documents with a specific `_score` value in the result
|
||||
* @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 {String} params.q - Query in the Lucene query string syntax
|
||||
* @param {String} params.analyzer - The analyzer to use for the query string
|
||||
* @param {Boolean} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
|
||||
* @param {String} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
|
||||
* @param {String} params.df - The field to use as default where no field prefix is given in the query string
|
||||
* @param {Boolean} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
|
||||
* @param {Boolean} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
|
||||
* @param {String, String[], Boolean} params.index - A comma-separated list of indices to restrict the results
|
||||
* @param {String, String[], Boolean} params.type - A comma-separated list of types to restrict the results
|
||||
*/
|
||||
@ -1119,6 +1124,35 @@ api.count = ca({
|
||||
},
|
||||
routing: {
|
||||
type: 'string'
|
||||
},
|
||||
q: {
|
||||
type: 'string'
|
||||
},
|
||||
analyzer: {
|
||||
type: 'string'
|
||||
},
|
||||
analyzeWildcard: {
|
||||
type: 'boolean',
|
||||
name: 'analyze_wildcard'
|
||||
},
|
||||
defaultOperator: {
|
||||
type: 'enum',
|
||||
'default': 'OR',
|
||||
options: [
|
||||
'AND',
|
||||
'OR'
|
||||
],
|
||||
name: 'default_operator'
|
||||
},
|
||||
df: {
|
||||
type: 'string'
|
||||
},
|
||||
lenient: {
|
||||
type: 'boolean'
|
||||
},
|
||||
lowercaseExpandedTerms: {
|
||||
type: 'boolean',
|
||||
name: 'lowercase_expanded_terms'
|
||||
}
|
||||
},
|
||||
urls: [
|
||||
@ -1915,9 +1949,7 @@ api.index = ca({
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
api.indices = function IndicesNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.indices = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [indices.analyze](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-analyze.html) request
|
||||
@ -3891,6 +3923,12 @@ api.indices.prototype.upgrade = ca({
|
||||
* @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
||||
* @param {Anything} params.operationThreading - TODO: ?
|
||||
* @param {String} params.q - Query in the Lucene query string syntax
|
||||
* @param {String} params.analyzer - The analyzer to use for the query string
|
||||
* @param {Boolean} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
|
||||
* @param {String} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
|
||||
* @param {String} params.df - The field to use as default where no field prefix is given in the query string
|
||||
* @param {Boolean} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
|
||||
* @param {Boolean} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
|
||||
* @param {String, String[], Boolean} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
|
||||
* @param {String, String[], Boolean} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
|
||||
*/
|
||||
@ -3923,6 +3961,32 @@ api.indices.prototype.validateQuery = ca({
|
||||
},
|
||||
q: {
|
||||
type: 'string'
|
||||
},
|
||||
analyzer: {
|
||||
type: 'string'
|
||||
},
|
||||
analyzeWildcard: {
|
||||
type: 'boolean',
|
||||
name: 'analyze_wildcard'
|
||||
},
|
||||
defaultOperator: {
|
||||
type: 'enum',
|
||||
'default': 'OR',
|
||||
options: [
|
||||
'AND',
|
||||
'OR'
|
||||
],
|
||||
name: 'default_operator'
|
||||
},
|
||||
df: {
|
||||
type: 'string'
|
||||
},
|
||||
lenient: {
|
||||
type: 'boolean'
|
||||
},
|
||||
lowercaseExpandedTerms: {
|
||||
type: 'boolean',
|
||||
name: 'lowercase_expanded_terms'
|
||||
}
|
||||
},
|
||||
urls: [
|
||||
@ -4258,9 +4322,7 @@ api.mtermvectors = ca({
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
api.nodes = function NodesNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.nodes = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [nodes.hotThreads](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html) request
|
||||
@ -4960,9 +5022,7 @@ api.search = ca({
|
||||
type: 'enum',
|
||||
options: [
|
||||
'query_then_fetch',
|
||||
'query_and_fetch',
|
||||
'dfs_query_then_fetch',
|
||||
'dfs_query_and_fetch',
|
||||
'count',
|
||||
'scan'
|
||||
],
|
||||
@ -5066,6 +5126,13 @@ api.search = ca({
|
||||
* @param {Number} params.minScore - Include only documents with a specific `_score` value in the result
|
||||
* @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 {String} params.q - Query in the Lucene query string syntax
|
||||
* @param {String} params.analyzer - The analyzer to use for the query string
|
||||
* @param {Boolean} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
|
||||
* @param {String} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
|
||||
* @param {String} params.df - The field to use as default where no field prefix is given in the query string
|
||||
* @param {Boolean} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
|
||||
* @param {Boolean} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
|
||||
* @param {String, String[], Boolean} params.index - A comma-separated list of indices to restrict the results
|
||||
* @param {String, String[], Boolean} params.type - A comma-separated list of types to restrict the results
|
||||
*/
|
||||
@ -5099,6 +5166,35 @@ api.searchExists = ca({
|
||||
},
|
||||
routing: {
|
||||
type: 'string'
|
||||
},
|
||||
q: {
|
||||
type: 'string'
|
||||
},
|
||||
analyzer: {
|
||||
type: 'string'
|
||||
},
|
||||
analyzeWildcard: {
|
||||
type: 'boolean',
|
||||
name: 'analyze_wildcard'
|
||||
},
|
||||
defaultOperator: {
|
||||
type: 'enum',
|
||||
'default': 'OR',
|
||||
options: [
|
||||
'AND',
|
||||
'OR'
|
||||
],
|
||||
name: 'default_operator'
|
||||
},
|
||||
df: {
|
||||
type: 'string'
|
||||
},
|
||||
lenient: {
|
||||
type: 'boolean'
|
||||
},
|
||||
lowercaseExpandedTerms: {
|
||||
type: 'boolean',
|
||||
name: 'lowercase_expanded_terms'
|
||||
}
|
||||
},
|
||||
urls: [
|
||||
@ -5283,9 +5379,7 @@ api.searchTemplate = ca({
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
api.snapshot = function SnapshotNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
api.snapshot = namespace();
|
||||
|
||||
/**
|
||||
* Perform a [snapshot.create](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html) request
|
||||
@ -5870,7 +5964,7 @@ api.update = ca({
|
||||
* @param {String} params.index - The name of the index
|
||||
* @param {String} params.type - The type of the document
|
||||
*/
|
||||
api.create = ca.proxy(api.index, {
|
||||
api.create = proxy(api.index, {
|
||||
transform: function (params) {
|
||||
params.op_type = 'create';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user