graphql-compose-elasticsearch
Version:
Elastic search via GraphQL
24 lines • 1.01 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getValueCountITC = void 0;
const utils_1 = require("../../../utils");
const Script_1 = require("../../Commons/Script");
const FieldNames_1 = require("../../Commons/FieldNames");
function getValueCountITC(opts) {
const name = (0, utils_1.getTypeName)('AggsValueCount', opts);
const description = (0, utils_1.desc)(`
A single-value metrics aggregation that counts the number of values that
are extracted from the aggregated documents.
[Documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-valuecount-aggregation.html)
`);
return opts.getOrCreateITC(name, () => ({
name,
description,
fields: {
field: (0, FieldNames_1.getAllFields)(opts),
script: () => (0, Script_1.getCommonsScriptITC)(opts),
},
}));
}
exports.getValueCountITC = getValueCountITC;
//# sourceMappingURL=ValueCount.js.map