graphql-compose-elasticsearch
Version:
Elastic search via GraphQL
30 lines • 1.36 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getPercentileRanksITC = void 0;
const utils_1 = require("../../../utils");
const Script_1 = require("../../Commons/Script");
const HDR_1 = require("../../Commons/HDR");
const FieldNames_1 = require("../../Commons/FieldNames");
function getPercentileRanksITC(opts) {
const name = (0, utils_1.getTypeName)('AggsPercentileRanks', opts);
const description = (0, utils_1.desc)(`
A multi-value metrics aggregation that calculates one or more percentile
ranks over 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-percentile-rank-aggregation.html)
`);
return opts.getOrCreateITC(name, () => ({
name,
description,
fields: {
field: (0, FieldNames_1.getNumericFields)(opts),
values: '[Float]',
hdr: () => (0, HDR_1.getCommonsHdrITC)(opts),
missing: 'Float',
script: () => (0, Script_1.getCommonsScriptITC)(opts),
},
}));
}
exports.getPercentileRanksITC = getPercentileRanksITC;
//# sourceMappingURL=PercentileRanks.js.map