We have migrated to Elasticsearch from 5.5 to 6.5. We have field in template index.codec but it is not accepting anymore when I try to create the template in ES6.5. But same template is getting created in ES5.5.
curl -X PUT "localhost:9200/_template/junoslogs" -H 'Content-Type: application/json' -d @template-lc.json
{"error":{"root_cause":[{"type":"parse_exception","reason":"unknown key [index.codec] in the template "}],"type":"parse_exception","reason":"unknown key [index.codec] in the template "},"status":400}
Template snippet is like below:
{
"order": 0,
"template": "jlogs-*",
"index.codec": "best_compression",
"settings": {
"index.refresh_interval": "5s",
"index":{
"number_of_shards" : 2,
"number_of_replicas" : 0,
........
Please help.