Elastic Client Advanced
Node library to save data on ES based on some protocols.
This library works on some protocols to save data in ES. Currently supporting only 2 protocols. Will be adding many more in future
- COUNT: Want to limit enteries in ES on basis of some key count
- DEFAULT: Behaves same as normal ES Client
Have a problem? Come chat with us!
Elastic Client Advanced will work on all systems.
npm install --save elastic-client-advanced
- Create a ES client and provide to lib, intentionally not taking es config as its redundant to have more than one client
const Q = ;const ElasticClient = ;const Elasticsearch = ;let client =host:host: '127.0.0.1'port: 9200// log: 'trace';
- Create a object of advanced ES Client
// 2nd Param is optional but its better if you providelet elasticClient = clientlogger: consolelog;
- Doing following steps
a. Init the client
b. Set protocol, here setting count protocol for column customerId
c. Set Fields for given type, other fields will be ingored
d. Insert in ES
let index = 'keyvalueindex';let type = 'keyvaluetype';let columns = 'a' 'b' 'c';const sleep = ;undefined;