UNPKG

graphql-compose-elasticsearch

Version:
27 lines 1.15 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getMinITC = void 0; const utils_1 = require("../../../utils"); const Script_1 = require("../../Commons/Script"); const FieldNames_1 = require("../../Commons/FieldNames"); function getMinITC(opts) { const name = (0, utils_1.getTypeName)('AggsMin', opts); const description = (0, utils_1.desc)(` A single-value metrics aggregation that keeps track and returns the minimum value among the numeric values extracted from the aggregated documents. These values can be extracted either from specific numeric fields in the documents, or be generated by a provided script. [Documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-min-aggregation.html) `); return opts.getOrCreateITC(name, () => ({ name, description, fields: { field: (0, FieldNames_1.getNumericFields)(opts), missing: 'Float', script: () => (0, Script_1.getCommonsScriptITC)(opts), }, })); } exports.getMinITC = getMinITC; //# sourceMappingURL=Min.js.map