title: AND query in elasticsearch with curl
body: <p>Let's inject some data in Elasticsearch</p>
  
  <pre><code>curl -XPUT 'localhost:9200/customer/external/1' -d '{ "author": "John", "published_from":"2016-08-03" }'
  curl -XPUT 'localhost:9200/customer/external/2' -d '{ "author": "Jeanne", "published_from":"2016-08-03" }'
  curl -XPUT 'localhost:9200/customer/external/3' -d '{ "author": "Jean", "published_from":"2016-08-05" }'
  </code></pre>
  
  <p>I am trying to query document with published_from=2016-08-03 and author=John.
  I try to do it with this curl command:</p>
  
  <pre><code>curl -g "localhost:9200/customer/external/_search?pretty&amp;filter_path=hits.hits._source.author&amp;q=+author:John+published_from:2016-08-03"
  </code></pre>
  
  <p>Yet, the output displays Jeanne </p>
  
  <pre><code>{
    "hits" : {
      "hits" : [
        {
          "_source" : {
            "author" : "John"
          }
        },
        {
          "_source" : {
            "author" : "Jeanne"
          }
        }
      ]
    }
  }
  </code></pre>
  
  <p>When I try this curl command :</p>
  
  <pre><code>curl "localhost:9200/customer/external/_search?pretty&amp;filter_path=hits.hits._source.author&amp;q=%2Bauthor%3AJohn+%2Bpublished_from%3A2016-08-03"
  </code></pre>
  
  <p>The output is exactly what I want.</p>
  
  <pre><code>{
    "hits" : {
      "hits" : [
        {
          "_source" : {
            "author" : "John"
          }
        }
      ]
    }
  }
  </code></pre>
  
  <p>Why is the first command not working as expected ?</p>