Rx-elasticsearch
RxJS Observables for the Elasticsearch javascript client
Install with npm
npm install rx-elasticsearch --save
Wrap existing Elasticsearch client
;; let client = host: 'localhost:9200' log: 'info'; let rxClient = client;
Initialization without Elasticsearch client
; let rxClient = RxClient;
Usage is the same as the Elasticsearch client, but returns observables.
let params = index: 'yourIndex' body: query: match_all: {} ; rxClient ;
With the scroll function you no longer need to call search first. This library takes care of that and clears the scroll automagicly when the scroll is finished.
let params = index: 'yourIndex' scroll: '1m' size: 1000 body: query: match_all: {} ; rxClient ;
For older javascript versions
var RxClient = default;