title: Elasticsearch always returning "mapping type is missing"
body: <p>I'm following the advice given here in order to find partial words with elasticsearch:</p>
  
  <p><a href="https://stackoverflow.com/questions/5044674/elasticsearch-n-gram-tokenfilter-not-finding-partial-words">ElasticSearch n-gram tokenfilter not finding partial words</a></p>
  
  <p>I've created a simple bash script that attempts to run a version of this:</p>
  
  <pre><code>curl -XDELETE 10.160.86.134:9200/products
  curl -XPOST 10.160.86.134:9200/products -d '{
    "index": {
      "number_of_shards": 1,
      "analysis": {
         "filter": {
           "mynGram" : {"type": "nGram", "min_gram": 2, "max_gram": 10}
         },
         "analyzer": {
           "a1" : {
             "type":"custom",
             "tokenizer": "standard",
             "filter": ["lowercase", "mynGram"]
           }
         }
       }
      }
    }
  }'
  
  curl -XPUT 10.160.86.134:9200/products/_mapping -d '{
    "product" : {
      "index_analyzer" : "a1",
      "search_analyzer" : "standard",
      "properties" : {
        "product_description": {"type":"string"},
        "product_name": {"type":"string"}
      }
    }
  }'
  </code></pre>
  
  <p>Following running this script the first two commands (dumping products, then setting the index) seem to work giving me this:</p>
  
  <pre><code>{"ok":true,"acknowledged":true}
  {"ok":true,"acknowledged":true}
  </code></pre>
  
  <p>Then it errors out following the mapping call giving me this:</p>
  
  <pre><code>{"error":"ActionRequestValidationException[Validation Failed: 1: mapping type is missing;]","status":500}
  </code></pre>
  
  <p>Can anyone see what I'm doing wrong?  Searching google starts autocompleting "mapping not found elasticsearch" so it seems to be a very common error.</p>