6.0.3 • Published 7 years ago

elastic-particles v6.0.3

Weekly downloads
1
License
BSD-2-Clause
Repository
github
Last release
7 years ago

Elastic Particles

Building blocks for Elastic queries, filters, and aggregations which can be re-used, combined, and nested. In other words, it's an elasticsearch query builder.

Documentation:

<v2 http://jharri34.github.io/elastic-particles/

>v2 https://github.com/3choBoomer/elastic-particles/wiki

basic usage

let locationTermQuery = new ep.TermQuery('age', 23);
let genderTermQuery = new ep.TermQuery('gender', 'M');

let boolMustQuery = new ep.BoolQuery().must([locationTermQuery, genderTermQuery]);

//each helper method on ElasticQuery returns iteself to support chaining.
let esQuery = new ep.ElasticQuery()
  .setQuery(boolMustQuery)
  .setSize(100)
  .setSort('personId')
  .setIncludeFields(['personId', 'gender', 'age', 'zipcode'])
  .addAggregation(new ep.TermsAgg('zipcode'));
  
  
elasticClient.search(esQuery.serialize());
6.0.3

7 years ago

6.0.3-alpha

7 years ago

6.0.2

7 years ago

6.0.1

7 years ago

2.2.10

7 years ago

2.2.9

8 years ago

2.2.8

8 years ago

2.2.7

8 years ago

2.2.6

8 years ago

2.2.5

8 years ago

2.2.4

8 years ago

2.2.3

8 years ago

2.2.2

9 years ago

0.0.15

9 years ago

0.0.14

9 years ago

0.0.13

9 years ago

2.2.1

9 years ago

0.0.12

9 years ago

2.2.0

9 years ago

2.0.0

9 years ago

0.0.11

9 years ago

0.0.10

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago