title: Elasticsearch query containing multiple search criterias
body: <p>I'm using Elasticsearch to store HTTP-log data in the following format:</p>
  
  <pre><code>{
      "domain": "www.vg.no", 
      "protocol": "HTTP/1.1", 
      "timestamp": "2014-03-19T15:58:18", 
      "destination_ip": "195.88.54.16", 
      "referer": "http://www.vg.no/path/example.exe", 
      "destination_port": "80", 
      "response_length": "4808", 
      "response_code": "200", 
      "source_ip": "192.1.1.1", 
      "uri": "/bil-og-motor/css/topp_artikkel2_bilogmotor.jpg", 
      "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.146 Safari/537.36", 
      "source_port": "63894", 
      "method": "GET"
  }
  </code></pre>
  
  <p>I'm trying to build a query where I can fetch data that matches user made criterias with the following options:
  domain, search string that may match any field, the uri includes a file extension, the timestamp is within a defined timerange. </p>
  
  <p>Example:</p>
  
  <ul>
  <li><em>Domain</em> = "www.vg.no",</li>
  <li>*_all* includes "*1.1*",</li>
  <li><em>uri</em> = "*.exe",</li>
  <li><em>timestamp</em> between "2014-03-19T00:00" and "2014-03-19T23:59"</li>
  </ul>
  
  <p>I've tried to make this query several times without success. I'd become really happy if somebody could help me :)</p>
  
  <p><strong>Update:</strong>
  This is how I insert the records using python:</p>
  
  <pre><code>es.index(
    index="test",
    doc_type="http_log",
    body={
     'timestamp' : self.request.timestamp,
     'domain' : self.request.domain,
     'uri' : self.request.uri,
     'user_agent' : self.request.user_agent,
     'referer' : self.request.referer,
     'method' : self.request.method,
     'protocol' : self.request.protocol,
     'response_code' : self.response.code,
     'response_length' : self.response.length,
     'source_ip' : self.request.source_ip,
     'source_port' : self.request.source_port,
     'destination_ip' : self.request.destination_ip,
     'destination_port' : self.request.destination_port
   }
  )
  </code></pre>