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

Aggregations: Histogram Aggregation bounds offsets #6605

rnonnon-ebiz opened this Issue Jun 24, 2014 · 4 comments


None yet
6 participants
Copy link

rnonnon-ebiz commented Jun 24, 2014


I'm working with elasticsearch and 1st, it's an amazing tool, 2nd I would suggest something about histogram aggregation with extended bounds.
Extended bounds is a good idea but it could be fine if we can force the bounds with, say, a boolean or another method...

For instance:
I have these data : [100,101,102,103,104]
I'd like to create an histogram with an interval of 3.

Elasticsearch will produce :
[ [99,doc_count:2] , [102,doc_count:3] ]
The problem is first tick always start from 0 but if I want to start my bucket from 100, I can't...

Then I can't obtain :
[ [100,doc_count:3] , [103,doc_count:2] ]

(The only solution is to perform a script on each data which will shift my data in the right bucket... then : creepy performances)

@areek areek assigned rjernst and unassigned rjernst Jun 29, 2014


This comment has been minimized.

Copy link

rnonnon-ebiz commented Jun 30, 2014

no answer???


This comment has been minimized.

Copy link

jpountz commented Jun 30, 2014

I think this feature makes sense. Date histograms have ways to move the origin for timezone-related reasons so I think normal histograms should have that feature too.

@jpountz jpountz self-assigned this Jun 30, 2014

@jpountz jpountz added the feature label Jun 30, 2014


This comment has been minimized.

Copy link

rnonnon-ebiz commented Jul 1, 2014

Great !
Thanks for your answer ;)


This comment has been minimized.

Copy link

zazasa commented Jul 21, 2014

Hi, i need this feature too.

@colings86 colings86 removed the adoptme label Jul 23, 2014

@colings86 colings86 assigned colings86 and unassigned jpountz Jul 23, 2014

@colings86 colings86 closed this in 127649d Jul 24, 2014

colings86 added a commit that referenced this issue Jul 24, 2014

Aggregations: Added pre and post offset to histogram aggregation
Added preOffset and postOffset parameters to the API for the histogram aggregation which work in the same way as in the date histogram

Closes #6605

@colings86 colings86 changed the title Histogram Aggregation bounds Aggregations: Histogram Aggregation bounds offsets Jul 29, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.