How to map custom time format In Elasticsearch


(Vatsal Patel) #1

I want to store time in below formate.

PUT my_index
{
"mappings": {
"my_type": {
"properties": {
"date": {
"type": "date",
"format": "basic_time_no_millis"
}
}
}
}
}

But it maps the document in

"date":
{
"type": "date",
"format": "dateOptionalTime"
}

How can i change from"dateOptionalTime" to"basic_time_no_millis".Thank you in advance


(Mark Walkom) #2

Are you sure the types are the same?


(system) #3