# Excluding Terms Using a Minus Sign

**URL:** <https://discuss.elastic.co/t/excluding-terms-using-a-minus-sign/21668>\
**Category:** Elasticsearch\
**Created:** [January 15, 2015, 7:37pm UTC](https://discuss.elastic.co/t/excluding-terms-using-a-minus-sign/21668 "2015-01-15T19:37:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cindy\_Conway](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cindy_conway/32/999_2.png) [@Cindy\_Conway](https://discuss.elastic.co/u/Cindy_Conway)\
**Post date:** [January 15, 2015, 7:37pm UTC](https://discuss.elastic.co/t/excluding-terms-using-a-minus-sign/21668/1 "2015-01-15T19:37:17Z")

</div>

Is there a way to exclude a term if the user precedes it with a minus sign;  
the way google does. For example, if I want to search for the word lovre,  
but I don't want the museum in France, I can search for:  
_louve -museum_ as my search terms. Does ES support this? I am not finding  
anything like that in the documentation.

Thanks All!

--  
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/b7e7fa83-332f-4fc9-a704-5abccb2d9856%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b7e7fa83-332f-4fc9-a704-5abccb2d9856%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:** [January 15, 2015, 7:43pm UTC](https://discuss.elastic.co/t/excluding-terms-using-a-minus-sign/21668/2 "2015-01-15T19:43:52Z")

</div>

Yes simple query string query supports this.  
See [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-simple-query-string-query.html#query-dsl-simple-query-string-query)

David

> Le 15 janv. 2015 à 20:37, Cindy Conway [cindyannconway@gmail.com](mailto:cindyannconway@gmail.com) a écrit :
> 
> Is there a way to exclude a term if the user precedes it with a minus sign; the way google does. For example, if I want to search for the word lovre, but I don't want the museum in France, I can search for:  
> louve -museum as my search terms. Does ES support this? I am not finding anything like that in the documentation.
> 
> ## Thanks All!
> 
> 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/b7e7fa83-332f-4fc9-a704-5abccb2d9856%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b7e7fa83-332f-4fc9-a704-5abccb2d9856%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/483A7A3D-24E0-4292-B156-55DD3874AEA5%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/483A7A3D-24E0-4292-B156-55DD3874AEA5%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:38am UTC](https://discuss.elastic.co/t/excluding-terms-using-a-minus-sign/21668/3 "2017-07-06T00:38:36Z")

</div>


