I am very new to Painless. I want to write a simple script to get the time difference between @timestamp and T1 in milliseconds.
I have tried using the doc['somefield'].value and doc['somefield'].date.millis and I am able to access @timestamp but not T1.
Any help will be highly appreciated! I have posted the sample data source below:
{
"_source": {
"@timestamp": "2018-11-06T00:20:08.802Z",
"fields": {
"T1": "2018-11-06T00:20:07.862Z",
}
}