Elasticsearch: Datatype for time(HH:mm:ss.SSS) field

1.6k views Asked by At

I want to index one field that contains only time in HH:mm:ss.SSS format. Which datatype I can use to store this field in elasticsearch.

1

There are 1 answers

3
Val On BEST ANSWER

You can use the date mapping type with a specific date format to accomodate your data:

{
  "my_field": {
    "type": "date",
    "format": "hour_minute_second_fraction"

  }
}