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

Fix DateHistogram-related functionality in Searches class #3806

Merged
merged 1 commit into from May 11, 2017

Conversation

Projects
None yet
2 participants
@joschi
Contributor

joschi commented May 10, 2017

Searches.DateHistogramInterval was using java.time.Period to define its intervals and tried to convert them to milliseconds in the Searches.DateHistogramInterval#getMillis() method which triggered an exception ("Cannot convert to Seconds as this period contains years and years vary in length") when using a period with variable length such as month, quarter, or year.

This change changes the DateHistogram-related methods in Searches to use the equivalent interval from the org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramInterval class to perform aggregations.

Fix DateHistogram-related functionality in Searches class
Searches.DateHistogramInterval was using java.time.Period to define its intervals and tried to
convert them to milliseconds in the Searches.DateHistogramInterval#getMillis() method which
triggered an exception ("Cannot convert to Seconds as this period contains years and years
vary in length") when using a period with variable length (such as year, quarter, or year).

This change changes the DateHistogram-related methods in Searches to use the equivalent interval
from the org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramInterval class to
perform aggregations.

@joschi joschi added this to the 2.3.0 milestone May 10, 2017

@dennisoelkers dennisoelkers merged commit d22ed68 into master May 11, 2017

4 checks passed

ci-web-linter Jenkins build graylog-pr-linter-check 1631 has succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
graylog-project/pr Jenkins build graylog-project-pr-snapshot 96 has succeeded
Details

@dennisoelkers dennisoelkers deleted the DateHistogramInterval-Period branch May 11, 2017

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