Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

elastic-particles

Package Overview
Dependencies
Maintainers
3
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elastic-particles

Building blocks for Elastic queries, filters, and aggregations which can be re-used, combed, and nested.

  • 6.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

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());

Keywords

FAQs

Package last updated on 11 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc