<p dir="auto">A min or max aggregation of a date field returns a floating point number, epoch milliseconds, despite it being internally stored as a long. Should it really return an long? In some rare cases, will floating point not return an entirely accurate answer?</p>
<p dir="auto">I store 64-Bit-Twitter-IDs in a long field in Elasticsearch documents:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&quot;tweetId&quot;: {
  &quot;type&quot;: &quot;long&quot;
}"><pre class="notranslate"><code class="notranslate">"tweetId": {
  "type": "long"
}
</code></pre></div>
<p dir="auto">I want to use Max aggregation to get the maximum id. Unfortunately I only get Double values (f.ex. 5.6253962514387763E17) instead of my Long Id and I loose the last digits.</p>
<p dir="auto">It would be perfect when I can also get the max value as <code class="notranslate">Long</code> instead of <code class="notranslate">Double</code>.</p>
<p dir="auto">See also my <a href="http://stackoverflow.com/questions/28295400/elasticsearch-max-long-value-aggregation" rel="nofollow">Stackoverflow question</a> about this issue.</p>