Timestamp with different date format

Hi
is is possible to insert on the same index datas with distinct date format

thinking of that for indexing historical facts as an example

Sometime you know the precise date of an event so you can enter DD/MM/YYYY

and sometime you just know MM/YYYY or even sometime YYYY

so i wonder if it's possible to insert as this or it is needed to fill the missing info by a 'default' value
example 1923 i don't know the month and date so i have to fill with 1/1/1923 or can i insert 1923 and it will positioned as 1/1/1923 by itself.

thanks

IF you are using a date type field in the document, then it would be easy.

Check the mapping of the elasticsearch index.

Also to convert the time strings into date type use the date filter plugin in logstash

like this one?
I should have read it
thanks

Yes... This is the one...
This will make sure that you create field as date type in Elasticsearch.

Also please make sure the date formats you are specifying is correct for various inputs....

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.