title: Python requests.post does not force Elasticsearch to create missing index
body: <p>I want to push data to my Elasticsearch server using :</p>
  <pre><code>requests.post('http://localhost:9200/_bulk', data=data_1 + data_2)
  </code></pre>
  <p>and it complains that the index does not exist. I try creating the index manually:</p>
  <pre><code>    curl -X PUT http://localhost:9200/_bulk
  </code></pre>
  <p>and it complains that I am not feeding a body to it:</p>
  <pre><code>    {&quot;error&quot;:{&quot;root_cause&quot;:[{&quot;type&quot;:&quot;parse_exception&quot;,&quot;reason&quot;:&quot;request body is required&quot;}],&quot;type&quot;:&quot;parse_exception&quot;,&quot;reason&quot;:&quot;request body is required&quot;},&quot;status&quot;:400}
  </code></pre>
  <p>Seems like a bit of a chicken and egg problem here. How can I create that <code>_bulk</code> index, and then post my data?</p>
  <p>EDIT:</p>
  <p>My data is very large to even understand the schema. Here is a small snippet:</p>
  <pre><code>'{&quot;create&quot;:{&quot;_index&quot;:&quot;products-guys&quot;,&quot;_type&quot;:&quot;t&quot;,&quot;_id&quot;:&quot;0&quot;}}\n{&quot;url&quot;:&quot;http://www.plaisio.gr/thleoraseis/tv/tileoraseis/LG-TV-43-43LH630V.htm&quot;,&quot;title&quot;:&quot;TV LG 43\\&quot; 43LH630V LED Full HD Smart&quot;,&quot;description&quot;:&quot;\\u039a\\u03b1\\u03b9 \\u03cc\\u03bc\\u03bf\\u03c1\\u03c6\\u03b7 \\u03ba\\u03b1\\u03b9 \\u03ad\\u03be\\u03c5\\u03c0\\u03bd\\u03b7, \\u03bc\\u03b5 \\u03b9\\u03c3\\u03c7\\u03c5\\u03c1\\u03cc \\u03b5\\u03c0\\u03b5\\u03be\\u03b5\\u03c1\\u03b3\\u03b1\\u03c3\\u03c4\\u03ae \\u03b5\\u03b9\\u03ba\\u03cc\\u03bd\\u03b1\\u03c2 \\u03ba\\u03b1\\u03b9 \\u03bb\\u03b5\\u03b9\\u03c4\\u03bf\\u03c5\\u03c1\\u03b3\\u03b9\\u03ba\\u03cc webOS 3.0 \\u03b5\\u03af\\u03bd\\u03b1\\u03b9 \\u03b7 \\u03c4\\u03b7\\u03bb\\u03b5\\u03cc\\u03c1\\u03b1\\u03c3\\u03b7 \\u03c0\\u03bf\\u03c5 \\u03c0\\u03ac\\u03b5\\u03b9 \\u03c3\\u03c4\\u03bf \\u03c3\\u03b1\\u03bb\\u03cc\\u03bd\\u03b9 \\u03c3\\u03bf\\u03c5&quot;,&quot;priceCurrency&quot;:&quot;EUR&quot;,&quot;price&quot;:369.0}\n{&quot;create&quot;:{&quot;_index&quot;:&quot;products-guys&quot;,&quot;_type&quot;:&quot;t&quot;,&quot;_id&quot;:&quot;1&quot;}}\n{&quot;url&quot;:&quot;http://www.plaisio.gr/thleoraseis/tv/tileoraseis/Samsung-TV-43-UE43M5502.htm&quot;,&quot;title&quot;:&quot;TV Samsung 43\\&quot; UE43M5502 LED ...
  </code></pre>
  <p>This is essentially someone else's code, that I need to make work. It seems that the &quot;data&quot; object I am passing to the PUT method is a string.</p>
  <p>When I use <code>requests.post('http://localhost:9200/_bulk', data=data)</code></p>
  <p>I get <code>&lt;Response [406]&gt;</code>,</p>