Show time with millisecond

Hi,
On Elastic search version 7.4 ,
I need to have a column that keep time results which include milliseconds as well.
For example:

Name        result
A           32.45         
B           2.12.67      

(32.45 mean : 32 second and 45 milliseconds)
(2.12.67 mean : 2 minute 12 second and 67 milliseconds)

  1. Please advise how format such a field
  2. Does Elastic search will understand that 2.12.67 is bigger than 32.45 ?

Thanks
Yoav

I would recommend storing it in milliseconds as a long.

No. This seems to be strings, which are sorted based on lexical order. 32.45 is therefore considered larger than 2.12.67 as 3 > 2.

Christian, Thanks for your quick response

No. This seems to be strings, which are sorted based on lexical order. 32.45 is therefore considered larger than 2.12.67 as 3 > 2.

I was requested to order the result in descending order .
Also was requested to keep the time results in human readable format Minute-second-milisecond
What are my options ?

Thanks Again
Yoav

Might storing them in both formats be an option? Sort and filter based on the numeric field and display the string field.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.