graphql-compose-elasticsearch
Version:
Elastic search via GraphQL
27 lines • 1.21 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getBucketSelectorITC = void 0;
const utils_1 = require("../../../utils");
function getBucketSelectorITC(opts) {
const name = (0, utils_1.getTypeName)('AggsBucketSelector', opts);
const description = (0, utils_1.desc)(`
A parent pipeline aggregation which executes a script which determines
whether the current bucket will be retained in the parent multi-bucket
aggregation. The specified metric must be numeric and the script must
return a boolean value. If the script language is expression then a numeric
return value is permitted. In this case 0.0 will be evaluated as false
and all other values will evaluate to true.
[Documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-pipeline-bucket-selector-aggregation.html)
`);
return opts.getOrCreateITC(name, () => ({
name,
description,
fields: {
buckets_path: 'JSON!',
script: 'String!',
gap_policy: 'String',
},
}));
}
exports.getBucketSelectorITC = getBucketSelectorITC;
//# sourceMappingURL=BucketSelector.js.map