# Negative query : all the documents that DONT have the word "cat' in the title?

**URL:** <https://discuss.elastic.co/t/negative-query-all-the-documents-that-dont-have-the-word-cat-in-the-title/22032>\
**Category:** Elasticsearch\
**Created:** [February 8, 2015, 1:36pm UTC](https://discuss.elastic.co/t/negative-query-all-the-documents-that-dont-have-the-word-cat-in-the-title/22032 "2015-02-08T13:36:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nicom](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nicom/32/488_2.png) [@nicom](https://discuss.elastic.co/u/nicom)\
**Post date:** [February 8, 2015, 1:36pm UTC](https://discuss.elastic.co/t/negative-query-all-the-documents-that-dont-have-the-word-cat-in-the-title/22032/1 "2015-02-08T13:36:45Z")

</div>

hi ,

How to formulate a negative query in ES that matches : all the documents  
that don't have the word "cat' in the title?

thanks

NM

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/baf37d43-867d-4717-8a1d-bb77add2ab4b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/baf37d43-867d-4717-8a1d-bb77add2ab4b%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 8, 2015, 4:10pm UTC](https://discuss.elastic.co/t/negative-query-all-the-documents-that-dont-have-the-word-cat-in-the-title/22032/2 "2015-02-08T16:10:29Z")

</div>

Using a query string query -cat should work.

David

> Le 8 févr. 2015 à 14:36, NM [n.maisonneuve@gmail.com](mailto:n.maisonneuve@gmail.com) a écrit :
> 
> hi ,
> 
> How to formulate a negative query in ES that matches : all the documents that don't have the word "cat' in the title?
> 
> thanks
> 
> ## NM
> 
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/baf37d43-867d-4717-8a1d-bb77add2ab4b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/baf37d43-867d-4717-8a1d-bb77add2ab4b%40googlegroups.com).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/7D43F995-C376-4035-9939-7669C7035090%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/7D43F995-C376-4035-9939-7669C7035090%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 12:34am UTC](https://discuss.elastic.co/t/negative-query-all-the-documents-that-dont-have-the-word-cat-in-the-title/22032/3 "2017-07-06T00:34:17Z")

</div>

Closed on July 6, 2017, 12:34am UTC


