# Query multiple words with AND and OR operators

**URL:** <https://discuss.elastic.co/t/query-multiple-words-with-and-and-or-operators/22590>\
**Category:** Elasticsearch\
**Created:** [March 9, 2015, 10:10pm UTC](https://discuss.elastic.co/t/query-multiple-words-with-and-and-or-operators/22590 "2015-03-09T22:10:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leandro\_Camargo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandro_camargo/32/850_2.png) [@Leandro\_Camargo](https://discuss.elastic.co/u/Leandro_Camargo)\
**Post date:** [March 9, 2015, 10:10pm UTC](https://discuss.elastic.co/t/query-multiple-words-with-and-and-or-operators/22590/1 "2015-03-09T22:10:00Z")

</div>

Hi.

Lets say I query my website with "interesting question" term.  
I want to match occurrences _preferably_ with both words, and add to the  
results less important entries with 1 to N-1 passed words in the term.  
Is there a way to perform one single search to achieve that?

Thanks in advance.

--  
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/89529351-9ddc-4a25-a38e-b54b76d2d2d0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/89529351-9ddc-4a25-a38e-b54b76d2d2d0%40googlegroups.com).  
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:27am UTC](https://discuss.elastic.co/t/query-multiple-words-with-and-and-or-operators/22590/2 "2017-07-06T00:27:42Z")

</div>

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


