title: Elasticsearch: No handler for type [keyword] declared on field [hostname]
body: <p>I get above Mapper Parsing Error on Elasticsearch when indexing log from filebeat.</p>
  
  <p>I tried both Filebeat -> Elasticserach and Filebeat -> Logstash -> Elasticsearch approach.</p>
  
  <p>I have followed their own documentations, I installed filebeat template as per instructed and verified from <a href="https://www.elastic.co/guide/en/beats/filebeat/1.2/filebeat-template.html" rel="noreferrer">Loading the Index Template in Elasticsearch | Filebeat Reference</a></p>
  
  <p>My elasticsearch is normally working fine with my other data indexing and I tested them on Kibana. Its an official docker <a href="https://hub.docker.com/_/elasticsearch/" rel="noreferrer">Docker Hub | Elasticsearch</a> installation.</p>
  
  <p>Googled a lot without any luck so, any help is appreciated.</p>
  
  <p><strong>UPDATE 1:</strong></p>
  
  <p>ES version: 2.3.3 (I believe latest one)</p>
  
  <p>Template file is the default shipped with filebeat.</p>
  
  <pre><code>{
    "mappings": {
      "_default_": {
        "_all": {
          "norms": false
        },
        "dynamic_templates": [
          {
            "fields": {
              "mapping": {
                "ignore_above": 1024,
                "type": "keyword"
              },
              "match_mapping_type": "string",
              "path_match": "fields.*"
            }
          }
        ],
        "properties": {
          "@timestamp": {
            "type": "date"
          },
          "beat": {
            "properties": {
              "hostname": {
                "ignore_above": 1024,
                "type": "keyword"
              },
              "name": {
                "ignore_above": 1024,
                "type": "keyword"
              }
            }
          },
          "input_type": {
            "ignore_above": 1024,
            "type": "keyword"
          },
          "message": {
            "norms": false,
            "type": "text"
          },
          "offset": {
            "type": "long"
          },
          "source": {
            "ignore_above": 1024,
            "type": "keyword"
          },
          "type": {
            "ignore_above": 1024,
            "type": "keyword"
          }
        }
      }
    },
    "order": 0,
    "settings": {
      "index.refresh_interval": "5s"
    },
    "template": "filebeat-*"
  }
  </code></pre>
  
  <p><strong>UPDATE 2:</strong>
  You are right, see</p>
  
  <p><code>#/usr/share/filebeat/bin/filebeat --version
  filebeat version 5.0.0-alpha2 (amd64), libbeat 5.0.0-alpha2</code></p>
  
  <p>Though this is posting apache log to logstash. But I can't get this vhost_combined log in right format</p>
  
  <p><code>sub1.example.com:443 1.9.202.41 - - [03/Jun/2016:06:58:17 +0000] "GET /notifications/pendingCount HTTP/1.1" 200 591 0 32165 "https://sub1.example.com/path/index?var=871190" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36"</code></p>
  
  <p><code>"message" =&gt; "%{HOSTNAME:vhost}\:%{NUMBER:port} %{COMBINEDAPACHELOG}"</code></p>