vladholubiev / es-count-by

Get top field values from ES

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Elasticsearch Count By

Like _.countBy from lodash, but over Elasticsearch

Install

$ yarn add es-count-by

Usage

import {init, countBy} from 'es-count-by';

init('http://localhost:9200');

const counts = await countBy('type'); // {a: 1, b: 2, c: 3}

About

Get top field values from ES


Languages

Language:JavaScript 100.0%