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: Prevent negative intervals in date_histogram #9634
Comments
Without the "min_doc_count" there seems to be no problem. Still, negative intervals don't make much sense in date_histogram, so I'll make it raise IllegalArgument exception. |
For |
FYI we prefer using ElasticsearchIllegalArgumentException instead of IllegalArgument whenever possible. The reason is that these exceptions are converted to 400 - Bad request on the rest layer. |
Yes, that's what I actually meant. Is there a good way to test for exceptions in the ElasticsearchIntegrationTest? All the exceptions on shard level seem to get wrapped into a SearchPhaseExecutionException, the only way to check the undelying cause seems to me to check the message string. At least that's what I see a lot in other tests, e.g. SimpleChildQuerySearchTests:
|
Yeah, unfortunately I don't think we can do better (or I'm not aware of it). |
Using a negative numeric
interval
setting indate_histogram
can lead to OOM erros on 1.4.2:The text was updated successfully, but these errors were encountered: