I have not used Ingest Pipelines yet, but I will try that out shortly.
However, I have created a date field in the Index Patterns interface. The issue is that I have not found a way to use the new field as the "@timestamp". Elastic does not pick it up automatically as such, and I have not found a manual way to do it.
The incoming field is of the form "yyyyMMddHHmmss++", where "++" means hundredths of a second. For example: 2021101508130522, so I created a new date field using:
String dateString = doc['DATE'].value.toString().substring(0,14);
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
Date date = dateFormat.parse(dateString);
long l = date.getTime();
In other words I trim off the last two characters (the "++"), and then use an accepted date format. The field is successfully created, but now I need it to be the "@timestamp".
Is there a way of trimming off the last two characters using Ingest Pipelines so that Elastic picks it up as the "@timestamp"?