graphql-compose-elasticsearch
Version:
Elastic search via GraphQL
30 lines • 1.21 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getGeohashGridITC = void 0;
const utils_1 = require("../../../utils");
const FieldNames_1 = require("../../Commons/FieldNames");
function getGeohashGridITC(opts) {
const name = (0, utils_1.getTypeName)('AggsGeohashGrid', opts);
const description = (0, utils_1.desc)(`
A multi-bucket aggregation that works on geo_point fields and groups points
into buckets that represent cells in a grid. Each cell is labeled using
a geohash which is of user-definable precision. Geohashes can have a choice
of precision between 1 and 12.
[Documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-geohashgrid-aggregation.html)
`);
return opts.getOrCreateITC(name, () => ({
name,
description,
fields: {
field: (0, FieldNames_1.getGeoPointFields)(opts),
precision: 'Int',
size: {
type: 'Int',
defaultValue: 10000,
},
shard_size: 'Int',
},
}));
}
exports.getGeohashGridITC = getGeohashGridITC;
//# sourceMappingURL=GeohashGrid.js.map