# Query advice

**URL:** <https://discuss.elastic.co/t/query-advice/74151>\
**Category:** Elasticsearch\
**Created:** [February 7, 2017, 1:56am UTC](https://discuss.elastic.co/t/query-advice/74151 "2017-02-07T01:56:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jupiterchain](https://avatars.discourse-cdn.com/v4/letter/j/53a042/32.png) [@jupiterchain](https://discuss.elastic.co/u/jupiterchain)\
**Post date:** [February 7, 2017, 1:56am UTC](https://discuss.elastic.co/t/query-advice/74151/1 "2017-02-07T01:56:59Z")

</div>

Hi, I'm new here. I have read through the documentation. I have a very specific problem. It seems there are multiple ways to solve it. So, rather than reinvent the wheel, I'm seeking your advice. What's the best solution to this problem?

I am going to store news articles in Elasticsearch. The main fields will be Headline, Body, Source.

I want to run a single search that works like this:

- the word "Apple" must appear in either the Headline or Body.
- either the phrase "iphone 9" OR "Tim Cook" must appear in the Headline or Body.
- the phrase "press release" must not appear in the Headline.
- the Source must equal "Wall Street Journal"

What is the best way to accomplish this?

---

<div class="post-metadata">

**Author:** ![amar-tari](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amar-tari/32/14243_2.png) [@amar-tari](https://discuss.elastic.co/u/amar-tari)\
**Post date:** [February 7, 2017, 5:52am UTC](https://discuss.elastic.co/t/query-advice/74151/2 "2017-02-07T05:52:11Z")

</div>

Since it will be keyword search, what is phrase you will be entering ? is it "Apple iphone 9 Tim Cook press release ... " ?

---

<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:** [March 7, 2017, 5:52am UTC](https://discuss.elastic.co/t/query-advice/74151/3 "2017-03-07T05:52:13Z")

</div>

Closed on March 7, 2017, 5:52am UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
