Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
createInnerRangeBucket() {
let metric
if (this.options.loadHistogram) {
metric = HistogramBucket(this.key, this.options.field, {
interval: this.getInterval(),
min_doc_count: 0,
extended_bounds: {
min: this.options.min,
max: this.options.max
}
})
} else {
metric = CardinalityMetric(this.key, this.options.field)
}
return metric
}
}