How to use the searchkit.HistogramBucket function in searchkit

To help you get started, we’ve selected a few searchkit examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mitodl / micromasters / static / js / components / search / FinalGradeRangeFilter.js View on Github external
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
  }
}