I want to create a date histogram with opensearch dashboards. The time format of my data is YYYY-MM-DD HH:mm:ss.SSS
, which I have set under Stack Management > Advanced Settings > Date Format. I get an error like this:
Under Discover, I can sort by "date", as it is of type "float". My field "timestamp", by which I would like to sort, is of type "string", and I cannot change this via the API:
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"mapper [timestamp] cannot be changed from type [text] to [date]"}],"type":"illegal_argument_exception","reason":"mapper [timestamp] cannot be changed from type [text] to [date]"},"status":400}
I'm stuck, can someone please help?