PUT _template/default@template
{
  "mappings": {
    "_default_": {
      "properties": {
        "geoip": {
          "dynamic": true,
          "properties": {
            "ip": {
            "type": "ip"
            },
            "location": {
              "type": "geo_point"
            },
            "latitude": {
              "type": "half_float"
            },
            "longitude": {
              "type": "half_float"
            }
          }
        }
      }
    }
  }
}想在初始化模板添加一些geoip的字段,但是报错
想请大神帮忙看看有什么问题
{
  "error": {
    "root_cause": [
      {
        "type": "action_request_validation_exception",
        "reason": "Validation Failed: 1: template is missing;"
      }
    ],
    "type": "action_request_validation_exception",
    "reason": "Validation Failed: 1: template is missing;"
  },
  "status": 400
}
 
	
6 个回复
laoyang360 - 《一本书讲透Elasticsearch》作者,Elastic认证工程师 [死磕Elasitcsearch]知识星球地址:http://t.cn/RmwM3N9;微信公众号:铭毅天下; 博客:https://elastic.blog.csdn.net
赞同来自: lovefirewall
juin - 大数据开发
赞同来自:
_template/ 后面应该是跟具体的索引名称吧
zqc0512 - andy zhou
赞同来自:
sweetpotato - 90IT男
赞同来自:
sweetpotato - 90IT男
赞同来自:
lovefirewall
赞同来自:
以下是我之前导入的模版内容,请大家仔细阅读 对比了楼上大神给的能够成功导入的映射模版之后,修改了默认logstash模版的一个json嵌套后,能够导入成功的模版内容如下觉得没区别的请仔细比对!请仔细比对!请仔细比对!
技术就是技术,容不得一点马虎!