egg-elasticsearch
egg plugin for elasticsearch
Install
$ npm i egg-elasticsearch2 --save
Usage
// {app_root}/config/plugin.jsexportselasticsearch2 = enable: true package: 'egg-elasticsearch2';
Configuration
单实例
// {app_root}/config/config.default.jsexportselasticsearch = host: 'host:port' // more options: https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/configuration.html;
多实例
exportselasticsearch = clients: es1: host: 'host1:port' es2: host: 'host2:port' ;
see config/config.default.js for more detail.
Example
单实例
'use strict'; module { app;};
多实例
'use strict'; module { app;};
Questions & Suggestions
Please open an issue here.