title: ElasticHttpError: 406, Elastic Search Error While indexing Data
body: <p>I am trying to index data in elastic search.</p>
  
  <p>following is the version and other details about elastic search</p>
  
  <pre><code>{ "name" : "Tmqcj9W",
    "cluster_name" : "elasticsearch",
    "cluster_uuid" : "HvwGfRrpR4-iaViCTm9ZwA",
    "version" : {
      "number" : "6.1.1",
      "build_hash" : "bd92e7f",
      "build_date" : "2017-12-17T20:23:25.338Z",
      "build_snapshot" : false,
      "lucene_version" : "7.1.0",
      "minimum_wire_compatibility_version" : "5.6.0",
      "minimum_index_compatibility_version" : "5.0.0",
     }"tagline" : "You Know, for Search"}
  </code></pre>
  
  <p>The client side code to index data is in python:</p>
  
  <pre><code>es = ElasticSearch('http://localhost:9200/')
  es.create_index(index_name)
  es.bulk_index("index_name", "doc_type", [{"title":"this is title","desc":"this is description"}])
  </code></pre>
  
  <p>I am getting the following error.</p>
  
  <p><em>"pyelasticsearch.exceptions.ElasticHttpError: (406, 'Content-Type header [] is not supported')"</em></p>
  
  <p>After few searches I got few suggestions saying I need to set the content type to <em>"application/json"</em>, but I am not sure how to set this.
  Can anyone help me with this ?.</p>