elastic-builder
Advanced tools
Comparing version 2.18.1 to 2.19.0
{ | ||
"name": "elastic-builder", | ||
"version": "2.18.1", | ||
"version": "2.19.0", | ||
"description": "A JavaScript implementation of the elasticsearch Query DSL", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -171,2 +171,28 @@ 'use strict'; | ||
/** | ||
* Set's the range/bounds for the histogram aggregation. | ||
* Useful when you want to limit the range of buckets in the histogram. | ||
* It is particularly useful in the case of open data ranges that can result in a very large number of buckets. | ||
* NOTE: Only available in Elasticsearch v7.10.0+ | ||
* | ||
* @example | ||
* const agg = esb.histogramAggregation('prices', 'price', 50).hardBounds(0, 500); | ||
* | ||
* @param {number|string} min Start bound / minimum bound value | ||
* For histogram aggregation, Integer value can be used. | ||
* For Date histogram, date expression can be used. | ||
* Available expressions for interval: | ||
* year, quarter, month, week, day, hour, minute, second | ||
* @param {number|string} max End bound / maximum bound value | ||
* For histogram aggregation, Integer value can be used. | ||
* For Date histogram, date expression can be used. | ||
* Available expressions for interval: | ||
* year, quarter, month, week, day, hour, minute, second | ||
* @returns {HistogramAggregationBase} returns `this` so that calls can be chained | ||
*/ | ||
hardBounds(min, max) { | ||
this._aggsDef.hard_bounds = { min, max }; | ||
return this; | ||
} | ||
/** | ||
* Sets the missing parameter which defines how documents | ||
@@ -173,0 +199,0 @@ * that are missing a value should be treated. |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1011478
25387