Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
pcsanwald opened this issue Jul 16, 2018 · 2 comments
Closed

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

pcsanwald opened this issue Jul 16, 2018 · 2 comments

Comments

@pcsanwald
Copy link
Contributor

pcsanwald commented Jul 16, 2018

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
			}, {
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search-aggs

@pcsanwald
Copy link
Contributor Author

addressed in #33254

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants