elastic-query
build elasticsearch queries the sane way
Install
npm install --save elastic-query
Motivation
the elasticsearch json query syntax pure pain
Setup
elastic-query
expects both ES_URL
and ES_INDEX
environment variables to be definied
so you may have a config file that looks something like:
export ES_INDEX=events
export ES_URL=https://mysearch:9200
Usage
var Query = // create a fresh query:var q = // chain modifications:qsize10 qqqq // call it!q // no args returns a promise q
Tests
npm test