elastic-builder
Advanced tools
Comparing version 2.14.0 to 2.15.0
@@ -77,2 +77,51 @@ 'use strict'; | ||
/** | ||
* Calendar-aware intervals are configured with the calendarInterval parameter. | ||
* The combined interval field for date histograms is deprecated from ES 7.2. | ||
* | ||
* @example | ||
* const agg = esb.dateHistogramValuesSource('by_month', 'date').calendarInterval( | ||
* 'month' | ||
* ); | ||
* | ||
* @param {string} interval Interval to generate histogram over. | ||
* You can specify calendar intervals using the unit name, such as month, or as | ||
* a single unit quantity, such as 1M. For example, day and 1d are equivalent. | ||
* Multiple quantities, such as 2d, are not supported. | ||
* @returns {DateHistogramValuesSource} returns `this` so that calls can be chained | ||
*/ | ||
}, { | ||
key: 'calendarInterval', | ||
value: function calendarInterval(interval) { | ||
this._opts.calendar_interval = interval; | ||
return this; | ||
} | ||
/** | ||
* Fixed intervals are configured with the fixedInterval parameter. | ||
* The combined interval field for date histograms is deprecated from ES 7.2. | ||
* | ||
* @example | ||
* const agg = esb.dateHistogramValuesSource('by_minute', 'date').calendarInterval( | ||
* '60s' | ||
* ); | ||
* | ||
* @param {string} interval Interval to generate histogram over. | ||
* Intervals are a fixed number of SI units and never deviate, regardless | ||
* of where they fall on the calendar. However, it means fixed intervals | ||
* cannot express other units such as months, since the duration of a | ||
* month is not a fixed quantity. | ||
* The accepted units for fixed intervals are: | ||
* millseconds (ms), seconds (s), minutes (m), hours (h) and days (d). | ||
* @returns {DateHistogramValuesSource} returns `this` so that calls can be chained | ||
*/ | ||
}, { | ||
key: 'fixedInterval', | ||
value: function fixedInterval(interval) { | ||
this._opts.fixed_interval = interval; | ||
return this; | ||
} | ||
/** | ||
* Sets the date time zone | ||
@@ -79,0 +128,0 @@ * |
{ | ||
"name": "elastic-builder", | ||
"version": "2.14.0", | ||
"version": "2.15.0", | ||
"description": "A JavaScript implementation of the elasticsearch Query DSL", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -50,2 +50,45 @@ 'use strict'; | ||
/** | ||
* Calendar-aware intervals are configured with the calendarInterval parameter. | ||
* The combined interval field for date histograms is deprecated from ES 7.2. | ||
* | ||
* @example | ||
* const agg = esb.dateHistogramValuesSource('by_month', 'date').calendarInterval( | ||
* 'month' | ||
* ); | ||
* | ||
* @param {string} interval Interval to generate histogram over. | ||
* You can specify calendar intervals using the unit name, such as month, or as | ||
* a single unit quantity, such as 1M. For example, day and 1d are equivalent. | ||
* Multiple quantities, such as 2d, are not supported. | ||
* @returns {DateHistogramValuesSource} returns `this` so that calls can be chained | ||
*/ | ||
calendarInterval(interval) { | ||
this._opts.calendar_interval = interval; | ||
return this; | ||
} | ||
/** | ||
* Fixed intervals are configured with the fixedInterval parameter. | ||
* The combined interval field for date histograms is deprecated from ES 7.2. | ||
* | ||
* @example | ||
* const agg = esb.dateHistogramValuesSource('by_minute', 'date').calendarInterval( | ||
* '60s' | ||
* ); | ||
* | ||
* @param {string} interval Interval to generate histogram over. | ||
* Intervals are a fixed number of SI units and never deviate, regardless | ||
* of where they fall on the calendar. However, it means fixed intervals | ||
* cannot express other units such as months, since the duration of a | ||
* month is not a fixed quantity. | ||
* The accepted units for fixed intervals are: | ||
* millseconds (ms), seconds (s), minutes (m), hours (h) and days (d). | ||
* @returns {DateHistogramValuesSource} returns `this` so that calls can be chained | ||
*/ | ||
fixedInterval(interval) { | ||
this._opts.fixed_interval = interval; | ||
return this; | ||
} | ||
/** | ||
* Sets the date time zone | ||
@@ -52,0 +95,0 @@ * |
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
1806204
43473