UNPKG

graphql-compose-elasticsearch

Version:
26 lines 1.06 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getMaxBucketITC = void 0; const utils_1 = require("../../../utils"); function getMaxBucketITC(opts) { const name = (0, utils_1.getTypeName)('AggsMaxBucket', opts); const description = (0, utils_1.desc)(` A sibling pipeline aggregation which identifies the bucket(s) with the maximum value of a specified metric in a sibling aggregation and outputs both the value and the key(s) of the bucket(s). The specified metric must be numeric and the sibling aggregation must be a multi-bucket aggregation. [Documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-pipeline-max-bucket-aggregation.html) `); return opts.getOrCreateITC(name, () => ({ name, description, fields: { buckets_path: 'String!', gap_policy: 'String', format: 'String', }, })); } exports.getMaxBucketITC = getMaxBucketITC; //# sourceMappingURL=MaxBucket.js.map