title: Unkown Key in Elasticsearch Template
body: <p>Hi i'm using elasticsearch 7.6.1 for my project, I want to create index template elasticsearch with http-index_template but when i try PUT index mapping like this :</p>
  
  <blockquote>
    <p>curl -XPUT -H 'Content-type: application/json'
    <a href="http://my-ip:9200/_template/http-index_template?pretty" rel="nofollow noreferrer">http://my-ip:9200/_template/http-index_template?pretty</a> -d
    @http-index_template.json</p>
  </blockquote>
  
  <p>it says :</p>
  
  <pre><code>{
    "error" : {
      "root_cause" : [
        {
          "type" : "parse_exception",
          "reason" : "unknown key [http-index_template] in the template "
        }
      ],
      "type" : "parse_exception",
      "reason" : "unknown key [http-index_template] in the template "
    },
    "status" : 400
  }
  </code></pre>
  
  <p>when i try to change <strong>my-ip</strong> to <strong>localhost</strong> it says: </p>
  
  <blockquote>
    <p>curl: (7) Failed to connect to localhost port 9200: Connection refused</p>
  </blockquote>
  
  <p>so whats problem here and how to fix this? </p>
  
  <p>http-index_template.json :</p>
  
  <pre><code>{
      "http-index_template": {
          "order": 0,
          "template": "http-index*",
          "settings": {},
          "mappings": {
              "http-log": {
                  "properties": {
                      "referer": {
                          "type": "text",
                          "fields": {
                              "keyword": {
                                  "ignore_above": 256,
                                  "type": "keyword"
                              }
                          }
                      },
                      "request": {
                          "type": "text",
                          "fields": {
                              "keyword": {
                                  "ignore_above": 256,
                                  "type": "keyword"
                              }
                          }
                      },
                      "virtual": {
                          "type": "text",
                          "fields": {
                              "keyword": {
                                  "ignore_above": 256,
                                  "type": "keyword"
                              }
                          }
                      },
                      "method": {
                          "type": "text",
                          "fields": {
                              "keyword": {
                                  "ignore_above": 256,
                                  "type": "keyword"
                              }
                          }
                      },
                      "version": {
                          "type": "text",
                          "fields": {
                              "keyword": {
                                  "ignore_above": 256,
                                  "type": "keyword"
                              }
                          }
                      },
                      "response_size": {
                          "type": "integer"
                      },
                      "client_port": {
                          "type": "integer"
                      },
                      "path": {
                          "type": "text",
                          "fields": {
                              "keyword": {
                                  "ignore_above": 256,
                                  "type": "keyword"
                              }
                          }
                      },
                      "hostname": {
                          "type": "text",
                          "fields": {
                              "keyword": {
                                  "ignore_above": 256,
                                  "type": "keyword"
                              }
                          }
                      },
                      "@timestamp": {
                          "type": "date"
                      },
                      "syslog_hostname": {
                          "type": "text",
                          "fields": {
                              "keyword": {
                                  "ignore_above": 256,
                                  "type": "keyword"
                              }
                          }
                      },
                      "port": {
                          "type": "integer"
                      },
                      "syslog_timestamp": {
                          "type": "text",
                          "fields": {
                              "keyword": {
                                  "ignore_above": 256,
                                  "type": "keyword"
                              }
                          }
                      },
                      "@version": {
                          "type": "text",
                          "fields": {
                              "keyword": {
                                  "ignore_above": 256,
                                  "type": "keyword"
                              }
                          }
                      },
                      "host": {
                          "type": "text",
                          "fields": {
                              "keyword": {
                                  "ignore_above": 256,
                                  "type": "keyword"
                              }
                          }
                      },
                      "server_ip": {
                          "type": "ip"
                      },
                      "client_ip": {
                          "type": "ip"
                      },
                      "response_time": {
                          "type": "integer"
                      },
                      "server_port": {
                          "type": "integer"
                      },
                      "status": {
                          "type": "integer"
                      },
                      "User-Agent": {
                          "type": "text",
                          "fields": {
                              "keyword": {
                                  "ignore_above": 256,
                                  "type": "keyword"
                              }
                          }
                      }
                  }
              }
          },
          "aliases": {}
      }
  }
  </code></pre>