index template由两部分组成,一个是setting一个是mapping
PUT _component_template/component_template1{"template": {"mappings": {"properties": {"@timestamp": {"type": "date"}}}}}PUT _component_template/other_component_template{"template": {"mappings": {"properties": {"ip_address": {"type": "ip"}}}}}PUT _index_template/template_1{"index_patterns": ["te*", "bar*"],"template": {"settings": {"number_of_shards": 1},"mappings": {"properties": {"host_name": {"type": "keyword"},"created_at": {"type": "date","format": "EEE MMM dd HH:mm:ss Z yyyy"}}},"aliases": {"mydata": { }}},"priority": 200,"composed_of": ["component_template1", "other_component_template"],"version": 3,"_meta": {"description": "my custom"}}
