title: Elasticsearch - python syntax from working curl example
body: <p>Using curl, the following request works:</p>
  
  <pre><code>curl -XGET 'localhost:9200/dumperino/_search?pretty' -H 'Content-Type: application/json' -d'
  {
    "query": {
      "bool": {
        "should": [
          { "match": { "id_1":  "4000000029898186" }},
          { "match": { "id_2":  "4000000029898188"   }}
        ]
      }
    }
  }
  '
  </code></pre>
  
  <p>I'm now trying to use elasticsearch via python.</p>
  
  <pre><code>from elasticsearch import helpers
  es = elasticsearch.Elasticsearch()
  qu={
    "query": {
      "bool": {
        "should": [
          { "match": { "id_1":  "4000000029898186" }},
          { "match": { "id_2": "4000000029898188"   }}
        ]
      }
    }
  }
  result = es.search(index= "dumperino",q=qu)
  </code></pre>
  
  <p>Error:
  <code>elasticsearch.exceptions.RequestError: TransportError(400, u'search_phase_execution_exception', u"Failed to parse query [{'query': {'bool': {'should': [{'match': {'id_1': '4000000029898186'}}, {'match': {'id_2': '4000000029898188'}}]}}}]")</code></p>
  
  <p>I've used this format successfully before, albeit with a simpler string query before.</p>
  
  <p>What do I need to change in the JSON query for elasticsearch to parse this correctly in Python?</p>