Mapping Time field without date

(vinay gupta) #1


In my logs, I have time field that only capture the time of the day. What should be mapping of this field should be in Elastic.

For e.g.

07:10:20 AM

08:20:50 PM

If I define the mapping as date with "format" : "hh:mm:ss a" then I get a timestamp from 1970 and if define the mapping as string then sorting and range queries become an issue.


(Mark Walkom) #2

You are better of fixing it before it goes into ES.

(vinay gupta) #3

Is there a way to just create a mapping for Time without the date?


(Mark Walkom) #4

If you really want to -

(system) #5