Interface IDateHistogramAggregation
Namespace: OpenSearch .Client
Assembly: OpenSearch.Client.dll
Syntax
public interface IDateHistogramAggregation : IBucketAggregation, IAggregation
Properties
| Edit this page View SourceCalendarInterval
The calendar interval to use when bucketing documents
Declaration
[DataMember(Name = "calendar_interval")]
Union<DateInterval?, DateMathTime> CalendarInterval { get; set; }
Property Value
Type | Description |
---|---|
Union<Date |
ExtendedBounds
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 Minimum
Declaration
[DataMember(Name = "extended_bounds")]
ExtendedBounds<DateMath> ExtendedBounds { get; set; }
Property Value
Type | Description |
---|---|
Extended |
Field
The field to target
Declaration
[DataMember(Name = "field")]
Field Field { get; set; }
Property Value
Type | Description |
---|---|
Field |
FixedInterval
The fixed interval to use when bucketing documents
Declaration
[DataMember(Name = "fixed_interval")]
Time FixedInterval { get; set; }
Property Value
Type | Description |
---|---|
Time |
Format
Return a formatted date string as the key instead an epoch long
Declaration
[DataMember(Name = "format")]
string Format { get; set; }
Property Value
Type | Description |
---|---|
string |
HardBounds
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
[DataMember(Name = "hard_bounds")]
HardBounds<DateMath> HardBounds { get; set; }
Property Value
Type | Description |
---|---|
Hard |
MinimumDocumentCount
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
[DataMember(Name = "min_doc_count")]
int? MinimumDocumentCount { get; set; }
Property Value
Type | Description |
---|---|
int? |
Missing
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
[DataMember(Name = "missing")]
DateTime? Missing { get; set; }
Property Value
Type | Description |
---|---|
Date |
Offset
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
[DataMember(Name = "offset")]
string Offset { get; set; }
Property Value
Type | Description |
---|---|
string |
Order
Defines an order in which returned buckets are sorted. By default the returned buckets are sorted by their key ascending.
Declaration
[DataMember(Name = "order")]
HistogramOrder Order { get; set; }
Property Value
Type | Description |
---|---|
Histogram |
Script
A script to execute to provide custom computation
Declaration
[DataMember(Name = "script")]
IScript Script { get; set; }
Property Value
Type | Description |
---|---|
IScript |
TimeZone
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
[DataMember(Name = "time_zone")]
string TimeZone { get; set; }
Property Value
Type | Description |
---|---|
string |