搞了好长时间终于成了。
{ "order": 0, "version": 50001, "template": "click.*", "settings": { "index": { "refresh_interval": "5s" } }, "mappings": { "_default_": { "dynamic_templates": [ { "remote_addr": { "mapping": { "doc_values": true, "type": "ip" }, "match": "remote_addr" } }, { "idsite": { "mapping": { "doc_values": true, "type": "integer" }, "match": "idsite" } }, { "cookice": { "mapping": { "doc_values": true, "type": "integer" }, "match": "cookice" } }, { "refts": { "mapping": { "doc_values": true, "type": "integer" }, "match": "refts" } }, { "idvs": { "mapping": { "doc_values": true, "type": "integer" }, "match": "idvs" } }, { "idts": { "mapping": { "doc_values": true, "type": "integer" }, "match": "idts" } }, { "rec": { "mapping": { "doc_values": true, "type": "integer" }, "match": "rec" } }, { "viewts": { "mapping": { "doc_values": true, "type": "integer" }, "match": "viewts" } }, { "message_field": { "path_match": "message", "mapping": { "norms": false, "type": "text" }, "match_mapping_type": "string" } }, { "string_fields": { "mapping": { "norms": false, "type": "text", "ignore_above": 256 }, "match_mapping_type": "string", "match": "*" } } ], "_all": { "norms": false, "enabled": true }, "properties": { "@timestamp": { "include_in_all": false, "type": "date" }, "geoip": { "dynamic": true, "properties": { "ip": { "type": "ip" }, "latitude": { "type": "half_float" }, "location": { "type": "geo_point" }, "longitude": { "type": "half_float" } } }, "@version": { "include_in_all": false, "type": "keyword" } } } }, "aliases": {} }