Skip to content

auto-interval date histogram: add response field that gives interval #32102

@pcsanwald

Description

@pcsanwald

As discussed in #28993, we want to specify the interval used in the aggregation so that clients don't have to dig into the buckets to infer the interval.

Here's an example

// Request
"sale_date" : {
         "auto_date_histogram" : {
             "field" : "timestamp"
         }
     }

// Response
"aggregations": {
		"sale_date": {
                       // This is the field we will add
                        "interval": 1d, 
			"buckets": [{
				"key_as_string": "2017-07-01T00:00:00.000Z",
				"key": 1498867200000,
				"doc_count": 124
			}, {

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions