Ealasticsearch results exactly as parameter
<p>I'm trying to filter logs based on the domain name. For example I only want the results of domain: bh250.example.com.</p>

<p>When I use the following query:</p>

<p><a href="http://localhost:9200/_search?pretty&amp;size=150&amp;q=domainname=bh250.example.com" rel="nofollow">http://localhost:9200/_search?pretty&amp;size=150&amp;q=domainname=bh250.example.com</a></p>

<p>the first 3 results have a domain name: bh250.example.com where the 4th having bh500.example.com</p>

<p>I have read several documentations on how to query to Elasticsearch but I seem to miss something. I only want results having 100% match with the parameter.</p>

<p>UPDATE!! After question from Val</p>

<pre><code>queryFilter = Q("match", domainname="bh250.example.com")

search=Search(using=dev_client, index="logstash-2016.09.21").query("bool", filter=queryFilter)[0:20]
</code></pre>

<p>You're almost there, you just need to make a small change:</p>

<pre><code>http://localhost:9200/_search?pretty&amp;size=150&amp;q=domainname:"bh250.example.com"
                                                          ^                  ^
                                                          |                  |
                                   use colon instead of equal... and double quotes
</code></pre>

python django elasticsearch