title: Python Elasticsearch, RequestError: TransportError(400, u'search_phase_execution_exception') happens intermittently. Why?
body: <p>I'm running basic filters on an elasticsearch (v. 1.7) cluster using Python Elasticsearch. Surprisingly, I can run the exact same code repeatedly and have a successful query about 1/2 the time, and receive a TransportError 400 about 1/2 the time. I'd like to know if the cause of this is my syntax, or something out of my control. </p>
  
  <pre><code>from elasticsearch import Elasticsearch    
  host_list = [HOST3, HOST4]
  client = Elasticsearch(hosts = host_list, timeout = 120)
  q = {"from" : 0, 
              "size" : 0,
              "query": {
                "filtered": {
                  "filter": {
                    "bool": {
                      "should": [
                        {"term": {
                          "field1": ["value1"]
                        }}, 
                        {"term": {
                          "field2": ["value2"]
                        }}
                      ],
                    "must": [
                      {"range": {
                        "times": {
                          "gte": "2015-04-21T00:00:00Z",
                          "lte": "2015-04-22T00:00:00Z"
                        }
                      }}
                    ]
                    }
                  }
                }
              }}
  res = client.search(index = "index_name", doc_type = ("doc_type_name"), body = q)
  </code></pre>
  
  <p>returns </p>
  
  <pre><code>RequestError               Traceback (most recent call last)
  --&gt; 265         res = client.search(...)
  (omitting long traceback through ES module code) 
  RequestError: TransportError(400, u'search_phase_execution_exception')
  </code></pre>
  
  <p>But the other half of the time I get a valid result?! Any ideas?</p>