Detect epoch as Date field

Hi every one,
i have an index (name: x-001) with a date field:

{
"time": {
        "type": "date"
      }
}

I insert docs into index like this:

time: 1607782041000

elasticsearch automatically convert epoch to datetime field and save!
I have created an ilm for rollover! after rollover and create new index like x-002
when i check the mapping of new index, i see that mapping is like this:

{
"time": {
        "type": "long"
      }
}

How can i fix this issue? How can i disable auto mapping?

You can create an index template if you need to keep as date vs long.

1 Like

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