title: python code fails to create correct mapping
body: <p>The following curl command works as expected. It returns the correct mapping but python code returns blank.</p>
  
  <pre><code>curl -X PUT localhost:9200/geotest/
  curl -X PUT localhost:9200/geotest/geotest/_mapping -d '{
      "geotest": {
          "properties": {
              "location": {
                  "type": "geo_point",
                  "lat_lon": true,
                  "geohash": true
              }
          }
      }
  }'
  
  curl -XGET localhost:9200/geotest/_mapping
  {"geotest":{"mappings":{"geotest":{"properties":{"location":{"type":"geo_point","lat_lon":true,"geohash":true}}}}}}
  </code></pre>
  
  <p>I expect this python code to be same as above...</p>
  
  <pre><code>import elasticsearch
  es = elasticsearch.Elasticsearch('http://some_site.com:9200/')
  
  mymapping={"geotest":{"properties":{"location":{"type":"geo_point","lat_lon":True,"geohash":True}}}}
  
  es.indices.delete(index = 'geotest')
  es.indices.create(index = 'geotest', body = mymapping)
  
  curl -XGET localhost:9200/geotest/_mapping
  {"geotest":{"mappings":{}}}
  </code></pre>
  
  <p>Why does python code does not create correct mapping the way curl does?</p>
  
  <hr>
  
  <p>Update:</p>
  
  <p>Using the put_mapping method I am not able to create wikipedia content index.</p>
  
  <pre><code>import urllib2
  myfile=urllib2.urlopen('https://en.wikipedia.org/w/api.php?action=cirrus-mapping-dump&amp;format=json').read()
  
  import ast
  myfile1=ast.literal_eval(myfile)['content']['page']['properties']
  
  import elasticsearch
  es = elasticsearch.Elasticsearch('http://some_site.com:9200/')
  
  es.indices.delete(index ='enwiki_todel')
  es.indices.create(index ='enwiki_todel')
  es.indices.put_mapping(index ='enwiki_todel', doc_type='page', body = myfile1)
  </code></pre>
  
  <hr>
  
  <p>update 2</p>
  
  <p>I tried to keep only content using ast module. And still getting mapper parsing exception.</p>
  
  <pre><code>import urllib2
  myfile=urllib2.urlopen('https://en.wikipedia.org/w/api.php?action=cirrus-mapping-dump&amp;format=json').read()
  
  import ast
  myfile1=ast.literal_eval(myfile)['content']
  
  import elasticsearch
  es = elasticsearch.Elasticsearch('http://ec2-52-91-179-95.compute-1.amazonaws.com:9200/')
  
  
  es.indices.delete(index ='enwiki_todel')
  es.indices.create(index ='enwiki_todel')
  es.indices.put_mapping(index ='enwiki_todel', doc_type='page', body = myfile1)
  </code></pre>