zoukankan      html  css  js  c++  java
  • 记录一个elasticsearch 的索引templates

    搞了好长时间终于成了。

    {
      "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": {}
    }
    

      

  • 相关阅读:
    RocketMQ
    Docker的基本使用
    logstash、ELK
    spring cloud杂文总结
    手写一个starter
    @SpringBootApplication你知多少?
    使用ElasticSearch
    ElasticSearch安装
    啥是ElasticSearch???
    socket、端口、进程的关系
  • 原文地址:https://www.cnblogs.com/xzlive/p/9361077.html
Copyright © 2011-2022 走看看