Class DateHistogramAggregationDescriptor<T>
Inheritance
DateHistogramAggregationDescriptor<T>
Assembly: OpenSearch.Client.dll
Syntax
public class DateHistogramAggregationDescriptor<T> : BucketAggregationDescriptorBase<DateHistogramAggregationDescriptor<T>, IDateHistogramAggregation, T>, IDescriptor, IDateHistogramAggregation, IBucketAggregation, IAggregation where T : class
Type Parameters
Methods
|
Edit this page
View Source
CalendarInterval(DateMathTime)
The calendar interval to use when bucketing documents
Declaration
public DateHistogramAggregationDescriptor<T> CalendarInterval(DateMathTime interval)
Parameters
Returns
|
Edit this page
View Source
CalendarInterval(DateInterval?)
The calendar interval to use when bucketing documents
Declaration
public DateHistogramAggregationDescriptor<T> CalendarInterval(DateInterval? interval)
Parameters
Returns
|
Edit this page
View Source
ExtendedBounds(DateMath, DateMath)
Extend the bounds of the date histogram beyond the data itself,
forcing the aggregation to start building buckets on
a specific min and/or max value.
Using extended bounds only makes sense when MinimumDocumentCount is 0
as empty buckets will never be returned if it is greater than 0.
Declaration
public DateHistogramAggregationDescriptor<T> ExtendedBounds(DateMath min, DateMath max)
Parameters
Returns
|
Edit this page
View Source
Field(Field)
Declaration
public DateHistogramAggregationDescriptor<T> Field(Field field)
Parameters
Type |
Name |
Description |
Field |
field |
|
Returns
|
Edit this page
View Source
Field<TValue>(Expression<Func<T, TValue>>)
Declaration
public DateHistogramAggregationDescriptor<T> Field<TValue>(Expression<Func<T, TValue>> field)
Parameters
Returns
Type Parameters
|
Edit this page
View Source
FixedInterval(Time)
The fixed interval to use when bucketing documents
Declaration
public DateHistogramAggregationDescriptor<T> FixedInterval(Time interval)
Parameters
Type |
Name |
Description |
Time |
interval |
|
Returns
|
Edit this page
View Source
Return a formatted date string as the key instead an epoch long
Declaration
public DateHistogramAggregationDescriptor<T> Format(string format)
Parameters
Type |
Name |
Description |
string |
format |
|
Returns
|
Edit this page
View Source
HardBounds(DateMath, DateMath)
The hard_bounds is a counterpart of extended_bounds and can 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.
Declaration
public DateHistogramAggregationDescriptor<T> HardBounds(DateMath min, DateMath max)
Parameters
Returns
|
Edit this page
View Source
MinimumDocumentCount(int?)
The minimum number of documents that a bucket must contain to be returned in the response.
The default is 0 meaning that buckets with no documents will be returned.
Declaration
public DateHistogramAggregationDescriptor<T> MinimumDocumentCount(int? minimumDocumentCount)
Parameters
Type |
Name |
Description |
int? |
minimumDocumentCount |
|
Returns
|
Edit this page
View Source
Missing(DateTime?)
Defines how to treat documents that are missing a value. By default, they are ignored,
but it is also possible to treat them as if they have a value.
Declaration
public DateHistogramAggregationDescriptor<T> Missing(DateTime? missing)
Parameters
Returns
|
Edit this page
View Source
Offset(string)
Change the start value of each bucket by the specified positive (+) or negative offset (-) duration,
such as 1h for an hour, or 1d for a day.
Declaration
public DateHistogramAggregationDescriptor<T> Offset(string offset)
Parameters
Type |
Name |
Description |
string |
offset |
|
Returns
|
Edit this page
View Source
Order(HistogramOrder)
Defines an order in which returned buckets are sorted.
By default the returned buckets are sorted by their key ascending.
Declaration
public DateHistogramAggregationDescriptor<T> Order(HistogramOrder order)
Parameters
Returns
|
Edit this page
View Source
OrderAscending(string)
Defines an order in which returned buckets are sorted.
By default the returned buckets are sorted by their key ascending.
Declaration
public DateHistogramAggregationDescriptor<T> OrderAscending(string key)
Parameters
Type |
Name |
Description |
string |
key |
|
Returns
|
Edit this page
View Source
OrderDescending(string)
Defines an order in which returned buckets are sorted.
By default the returned buckets are sorted by their key ascending.
Declaration
public DateHistogramAggregationDescriptor<T> OrderDescending(string key)
Parameters
Type |
Name |
Description |
string |
key |
|
Returns
|
Edit this page
View Source
Script(Func<ScriptDescriptor, IScript>)
A script to execute to provide custom computation
Declaration
public DateHistogramAggregationDescriptor<T> Script(Func<ScriptDescriptor, IScript> scriptSelector)
Parameters
Returns
|
Edit this page
View Source
Script(string)
A script to execute to provide custom computation
Declaration
public DateHistogramAggregationDescriptor<T> Script(string script)
Parameters
Type |
Name |
Description |
string |
script |
|
Returns
|
Edit this page
View Source
TimeZone(string)
Used to indicate that bucketing should use a different time zone.
Time zones may either be specified as an ISO 8601 UTC offset (e.g. +01:00 or -08:00)
or as a timezone id, an identifier used in the TZ database like America/Los_Angeles.
Declaration
public DateHistogramAggregationDescriptor<T> TimeZone(string timeZone)
Parameters
Type |
Name |
Description |
string |
timeZone |
|
Returns
Implements
Extension Methods