0

I am trying to create a Date Histogram and aggregate a particular field to find the maximum value which is of long type in mapping from my ealsticsearch, but i get the result in floating point number, for example : Instead of getting 31032832 am getting 3.1032832E7

However am able to get 31032832 properly when i query my elasticsearch index through chrome plugin sense.

Sushil Ks
  • 403
  • 2
  • 10
  • 18

1 Answers1

0

I found out what was the issue! it was giving me double value after aggregation because of this:

enter image description here

while accessing i called myResult.getMax().longValue() which solved my problem.

Sushil Ks
  • 403
  • 2
  • 10
  • 18