Hello there! I need a little help to understand what I'm doing wrong.
I need to modify this index template trying not to rewrite all of this settings and add a value refresh_interval
curl localhost:9200/_template/test-template
{
"test-template": {
"aliases": {},
"mappings": {
"message": {
"_source": {
"enabled": true
},
"dynamic_templates": [
{
"internal_fields": {
"mapping": {
"type": "keyword"
},
"match": "gl2_*",
"match_mapping_type": "string"
}
},
{
"store_generic": {
"mapping": {
"index": "not_analyzed"
},
"match": "*"
}
}
],
"properties": {
"full_message": {
"analyzer": "standard",
"fielddata": false,
"type": "text"
},
"gl2_accounted_message_size": {
"type": "long"
},
"gl2_processing_timestamp": {
"format": "yyyy-MM-dd HH:mm:ss.SSS",
"type": "date"
},
"gl2_receive_timestamp": {
"format": "yyyy-MM-dd HH:mm:ss.SSS",
"type": "date"
},
"message": {
"analyzer": "standard",
"fielddata": false,
"type": "text"
},
"source": {
"analyzer": "analyzer_keyword",
"fielddata": true,
"type": "text"
},
"streams": {
"type": "keyword"
},
"timestamp": {
"format": "yyyy-MM-dd HH:mm:ss.SSS",
"type": "date"
}
}
}
},
"order": -1,
"settings": {
"index": {
"analysis": {
"analyzer": {
"analyzer_keyword": {
"filter": "lowercase",
"tokenizer": "keyword"
}
}
}
}
},
"template": "test_*"
}
}
curl -XPUT localhost:9200/_template/test-template?pretty -d '
{
"template": "test_*",
"settings": {
"index": {
"refresh_interval": "3600s"
}
}
}'
On output I get this:
{
"test-template": {
"aliases": {},
"mappings": {},
"order": 0,
"settings": {
"index": {
"refresh_interval": "3600s"
}
},
"template": "test_*"
}
}