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: DateHistogramBuilder uses wrong data type for pre_offset and post_offset #5586

Closed
rusnyder opened this issue Mar 28, 2014 · 1 comment

Comments

@rusnyder
Copy link

The DateHistogramBuilder stores and builds the DateHistogram with a long value for the pre_offset and post_offset, which is neither what the API docs specify (which specify the format is the data format 1s, 2d, etc.) nor what the DateHistogramParser expect.

This forces the improper construction of DateHistogram requests when using the Java API to construct queries. Both the preOffset and postOffset variables should be converted to Strings.

@TheLudd
Copy link

TheLudd commented May 6, 2014

I experience the same error so +1 on fixing this.

@colings86 colings86 self-assigned this Jul 10, 2014
@colings86 colings86 removed the adoptme label Jul 10, 2014
colings86 added a commit that referenced this issue Jul 10, 2014
…ffset

This is what DateHistogramParser expects so will enable the builder to build valid requests using these variables.
Also added tests for preOffset and postOffset since these tests did not exist

Closes #5586
@spinscale spinscale changed the title DateHistogramBuilder uses wrong data type for pre_offset and post_offset Aggregations: DateHistogramBuilder uses wrong data type for pre_offset and post_offset Jul 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment