elasticsearch动态模板设置

PUT _template/logging

{

  "template":   "logs-*", 

  "settings": { "number_of_shards": 1 }, 

  "mappings": {

    "_default_": {

      "_all": { 

        "enabled": false

      },

      "dynamic_templates": [

        {

          "strings": { 

            "match_mapping_type": "string",

            "mapping": {

              "type": "string",

              "fields": {

                "raw": {

                  "type":  "string",

                  "index": "not_analyzed",

                  "ignore_above": 256

                }

              }

            }

          }

        }

      ]

    }

  }

}


你可能感兴趣的:(模板,es)