Default mapping for index

Dear all,

I am trying to index a json document which contains date fields but since I had no mapping defined before for the index, all date fields are "string". How can I define a mapping from the zero so that I will have my date fields as date and the others will stay string ?

Thank you

Hi,

Please consult with the documentation:

https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-date-format.html

https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html