Socket
Socket
Sign inDemoInstall

elastic-builder

Package Overview
Dependencies
11
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.8.0 to 2.9.0

50

lib/aggregations/bucket-aggregations/date-histogram-aggregation.js

@@ -80,2 +80,52 @@ '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.dateHistogramAggregation('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 {DateHistogramAggregation} returns `this` so that calls can be chained
*/
}, {
key: 'calendarInterval',
value: function calendarInterval(interval) {
this._aggsDef.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.
*
* @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.
*
* @example
* const agg = esb.dateHistogramAggregation('by_minute', 'date').calendarInterval(
* '60s'
* );
*
* The accepted units for fixed intervals are:
* millseconds (ms), seconds (s), minutes (m), hours (h) and days (d).
* @returns {DateHistogramAggregation} returns `this` so that calls can be chained
*/
}, {
key: 'fixedInterval',
value: function fixedInterval(interval) {
this._aggsDef.fixed_interval = interval;
return this;
}
}]);

@@ -82,0 +132,0 @@ return DateHistogramAggregation;

2

package.json
{
"name": "elastic-builder",
"version": "2.8.0",
"version": "2.9.0",
"description": "A JavaScript implementation of the elasticsearch Query DSL",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -15,3 +15,3 @@ # elastic-builder

Relavant blog post:
Relevant blog post:
https://blog.logrocket.com/elasticsearch-query-body-builder-node-js/

@@ -18,0 +18,0 @@

@@ -54,4 +54,48 @@ '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.dateHistogramAggregation('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 {DateHistogramAggregation} returns `this` so that calls can be chained
*/
calendarInterval(interval) {
this._aggsDef.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.
*
* @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.
*
* @example
* const agg = esb.dateHistogramAggregation('by_minute', 'date').calendarInterval(
* '60s'
* );
*
* The accepted units for fixed intervals are:
* millseconds (ms), seconds (s), minutes (m), hours (h) and days (d).
* @returns {DateHistogramAggregation} returns `this` so that calls can be chained
*/
fixedInterval(interval) {
this._aggsDef.fixed_interval = interval;
return this;
}
}
module.exports = DateHistogramAggregation;

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc