I using ES High rest api to upload json as document, no template is provide.
I want to make an index pattern by date, therefore I added a 'time' field contains time in various formats but it recognized as string in the index pattern window.
I tried some formats:
04-06-2020 12:21:42
04-06-2020T12:21:42
04-06-2020T12:21:42Z
04062020T122143Z
Epoch nanoseconds
I also tried to add "Scaled date format" in the advanced settings: ["P1TDF", "YYYY-MM-DD HH:mm:ss"]:
(not really understand the first key, just add format with full time, ss; UPDATE: I also added MM-DD-YYYY HH:mm:ss).
It can. But I do see that as a bad practice. In my former job, I had a field in which users can enter whatever reference they want to use.
The first user in my app, entered "2012-01-01". The second one entered "foo".
The problem is that the first one was looking like a date so Elasticsearch set to this field the date data type. Obviously the second document was rejected as "foo" can't be a date.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.