graphql-compose-elasticsearch
Version:
Elastic search via GraphQL
26 lines • 1.05 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getBucketScriptITC = void 0;
const utils_1 = require("../../../utils");
function getBucketScriptITC(opts) {
const name = (0, utils_1.getTypeName)('AggsBucketScript', opts);
const description = (0, utils_1.desc)(`
A parent pipeline aggregation which executes a script which can perform
per bucket computations on specified metrics in the parent multi-bucket
aggregation. The specified metric must be numeric and the script must
return a numeric value.
[Documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-pipeline-bucket-script-aggregation.html)
`);
return opts.getOrCreateITC(name, () => ({
name,
description,
fields: {
buckets_path: 'JSON!',
script: 'String!',
format: 'String',
gap_policy: 'String',
},
}));
}
exports.getBucketScriptITC = getBucketScriptITC;
//# sourceMappingURL=BucketScript.js.map