inceptum
Version:
hipages take on the foundational library for enterprise-grade apps written in NodeJS
133 lines • 3.95 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const elasticsearch = require("elasticsearch");
class ElasticsearchClient {
constructor(name, config) {
this.name = name;
this.configuration = Object.assign({}, config);
}
initialise() {
this.connection = new elasticsearch.Client(this.configuration);
}
getClientConfiguration() {
return this.configuration;
}
ping(params) {
return this.connection.ping(params);
}
indices() {
return this.connection.indices;
}
cat() {
return this.connection.cat;
}
bulk(params) {
return this.connection.bulk(params);
}
clearScroll(params) {
return this.connection.clearScroll(params);
}
count(params) {
return this.connection.count(params);
}
create(params, callback) {
this.connection.create(params, callback);
}
delete(params, callback) {
this.connection.delete(params, callback);
}
deleteByQuery(params, callback) {
this.connection.deleteByQuery(params, callback);
}
deleteScript(params, callback) {
this.connection.deleteScript(params, callback);
}
deleteTemplate(params, callback) {
this.connection.deleteTemplate(params, callback);
}
exists(params, callback) {
this.connection.exists(params, callback);
}
explain(params, callback) {
this.connection.explain(params, callback);
}
fieldStats(params, callback) {
this.connection.fieldStats(params, callback);
}
get(params) {
return this.connection.get(params);
}
getScript(params, callback) {
this.connection.getScript(params, callback);
}
getSource(params, callback) {
this.connection.getSource(params, callback);
}
getTemplate(params, callback) {
this.connection.getTemplate(params, callback);
}
index(params, callback) {
this.connection.index(params, callback);
}
info(params, callback) {
this.connection.info(params, callback);
}
mget(params) {
return this.connection.mget(params);
}
msearch(params) {
return this.connection.msearch(params);
}
msearchTemplate(params) {
return this.connection.msearchTemplate(params);
}
mtermvectors(params, callback) {
this.connection.mtermvectors(params, callback);
}
putScript(params, callback) {
this.connection.putScript(params, callback);
}
putTemplate(params, callback) {
this.connection.putTemplate(params, callback);
}
reindex(params, callback) {
this.connection.reindex(params, callback);
}
reindexRethrottle(params, callback) {
this.connection.reindexRethrottle(params, callback);
}
renderSearchTemplate(params, callback) {
this.connection.renderSearchTemplate(params, callback);
}
scroll(params, callback) {
this.connection.scroll(params, callback);
}
search(params, callback) {
this.connection.search(params, callback);
}
searchShards(params, callback) {
this.connection.searchShards(params, callback);
}
searchTemplate(params, callback) {
this.connection.searchTemplate(params, callback);
}
suggest(params, callback) {
this.connection.suggest(params, callback);
}
termvectors(params, callback) {
this.connection.termvectors(params, callback);
}
update(params, callback) {
this.connection.update(params, callback);
}
updateByQuery(params, callback) {
this.connection.updateByQuery(params, callback);
}
close() {
this.connection.close();
}
}
ElasticsearchClient.startMethod = 'initialise';
ElasticsearchClient.stopMethod = 'close';
exports.ElasticsearchClient = ElasticsearchClient;
//# sourceMappingURL=ElasticsearchClient.js.map