func (a *DateHistogramAggregation) OrderByAggregation(aggName string, asc bool) *DateHistogramAggregation {
	a.order = aggName
	a.orderAsc = asc
	return a
}
OrderByAggregation creates a bucket ordering strategy which sorts buckets
based on a single-valued calc get.
package elastic
type DateHistogramAggregation struct {
	field           string
	script          *Script
	missing         interface{}
	subAggregations map[string]Aggregation
	meta            map[string]interface{}
	interval          string
	order             string
	orderAsc          bool
	minDocCount       *int64
	extendedBoundsMin interface{}
	extendedBoundsMax interface{}
	timeZone          string
	format            string
	offset            string
}
func NewDateHistogramAggregation() *DateHistogramAggregation {
	return &DateHistogramAggregation{
		subAggregations: make(map[string]Aggregation),
	}
}
func (a *DateHistogramAggregation) Field(field string) *DateHistogramAggregation {
	a.field = field
	return a
}
func (a *DateHistogramAggregation) Script(script *Script) *DateHistogramAggregation {
	a.script = script
	return a
}
func (a *DateHistogramAggregation) Missing(missing interface{}) *DateHistogramAggregation {
	a.missing = missing
	return a
}
func (a *DateHistogramAggregation) SubAggregation(name string, subAggregation Aggregation) *DateHistogramAggregation {
	a.subAggregations[name] = subAggregation
	return a
}
func (a *DateHistogramAggregation) Meta(metaData map[string]interface{}) *DateHistogramAggregation {
	a.meta = metaData
	return a
}
func (a *DateHistogramAggregation) Interval(interval string) *DateHistogramAggregation {
	a.interval = interval
	return a
}
func (a *DateHistogramAggregation) Order(order string, asc bool) *DateHistogramAggregation {
	a.order = order
	a.orderAsc = asc
	return a
}
func (a *DateHistogramAggregation) OrderByCount(asc bool) *DateHistogramAggregation {
	a.order = "_count"
	a.orderAsc = asc
	return a
}
func (a *DateHistogramAggregation) OrderByCountAsc() *DateHistogramAggregation {
	return a.OrderByCount(true)
}
func (a *DateHistogramAggregation) OrderByCountDesc() *DateHistogramAggregation {
	return a.OrderByCount(false)
}
func (a *DateHistogramAggregation) OrderByKey(asc bool) *DateHistogramAggregation {
	a.order = "_key"
	a.orderAsc = asc
	return a
}
func (a *DateHistogramAggregation) OrderByKeyAsc() *DateHistogramAggregation {
	return a.OrderByKey(true)
}
func (a *DateHistogramAggregation) OrderByKeyDesc() *DateHistogramAggregation {
	return a.OrderByKey(false)
}