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

Histogram aggregation on range fields using lte/lt or gte/gt #23414

Closed
tomasfalt opened this issue Feb 28, 2017 · 6 comments
Closed

Histogram aggregation on range fields using lte/lt or gte/gt #23414

tomasfalt opened this issue Feb 28, 2017 · 6 comments

Comments

@tomasfalt
Copy link

Since it's impossible to do a histogram aggregation directly on a range field (see #23182) shouldn't it be possible to do it on any of the lte/lt or gte/gt fields?

@jpountz
Copy link
Contributor

jpountz commented Feb 28, 2017

Is it a feature request to be able to aggegate on range bounds, or is it a request for a workaround until #23182 is implemented?

@tomasfalt
Copy link
Author

Both actually. To start with as a workaround but I think there are several scenarios which will benefit from aggregation on the range bounds, for example the calculation of the churn rate for a certain intervals as a basis for churn prediction.

@tomasfalt
Copy link
Author

Also, it would be great if the max and min aggregations (and probably all other metrics aggregations) would work on the range bounds.

@jpountz
Copy link
Contributor

jpountz commented Jun 7, 2017

Agreed, there are several aggregations that could be generalized on range fields. We just started looking into doc values support for range fields, so I would not expect seeing the feature out in the short term however.

@polyfractal
Copy link
Contributor

polyfractal commented Mar 21, 2018

Should be largely unblocked at the moment (range fields have doc values, they are enabled by default now as of #24823, etc), and I think it's a feature we'd like to support eventually.

Adding adoptme tag though, since I don't think it is on anyone's immediate plate of work.

Note: the error message from trying to aggregate on a range_field is rather unhelpful since it tries to use field data (even though doc values are enabled):

{
  "type": "illegal_argument_exception",
  "reason": "Fielddata is not supported on field [expected_attendees] of type [integer_range]"
}

@elastic/es-search-aggs

@polyfractal
Copy link
Contributor

Closing in favor of #34644

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