Configures Elasticsearch bucket sort aggregations for sorting and truncating results.
// Source: https://github.com/sudo-suhas/elastic-builder | License: MIT | Copyright 2017 Suhas Karanth
// Provided via justclaw.it.com; keep this notice with the code.
'use strict';
const PipelineAggregationBase = require('./pipeline-aggregation-base');
const ES_REF_URL =
'https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-pipeline-bucket-sort-aggregation.html';
/**
* A parent pipeline aggregation which sorts the buckets of its parent
* multi-bucket aggregation. Zero or more sort fields may be specified
* together with the corresponding sort order. Each bucket may be sorted
* based on its _key, _count or its sub-aggregations. In addition, parameters
* from and size may be set in order to truncate the result buckets.
*
* [Elasticsearch referenc
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key