'date' field changes to 'long' after rollover

I have a field defined as 'date' type (see below) which i use with kibana but after the rollover it gets changed to 'long' and makes my newly created schema unusable in kibana. how do i prevent this from happening?

Thanks in advance

...
"timestamp": {
"type":"date",
"format": "epoch_millis"
}
...

Hey,

what kind of rollover are you doing? What does this exactly mean? Which Elasticsearch operations did you execute?

Have you considered using index templates, which have been built for such cases?

--Alex

Thanks Alex for the reply, sorry if i wasn't clear about the rollover.

I am basically rolling over the index based on time/doc count like this:

curl -X POST 'http://localhost:9200/data_collector_index/_rollover?pretty=true' -d '
{
"conditions": {
"max_docs": 6000000,
"max_age": "1d"
}
}'

I originally thought that schema will be copied from the previous schema but later realized that i had to use templates which solved my problem.

I do have one small question, regarding the templates:

should i be defining all the refresh_interval, number_of_shards, number_of_replicas, analyzers and mappings in the template? if so what would be included at the index creation time? just a blank create script?

Thanks,

Z

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