# Search with multiple keywords in Elastic

**URL:** <https://discuss.elastic.co/t/search-with-multiple-keywords-in-elastic/56984>\
**Category:** Elasticsearch\
**Created:** [August 2, 2016, 9:22am UTC](https://discuss.elastic.co/t/search-with-multiple-keywords-in-elastic/56984 "2016-08-02T09:22:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Muru](https://avatars.discourse-cdn.com/v4/letter/m/779978/32.png) [@Muru](https://discuss.elastic.co/u/Muru)\
**Post date:** [August 2, 2016, 9:22am UTC](https://discuss.elastic.co/t/search-with-multiple-keywords-in-elastic/56984/1 "2016-08-02T09:22:39Z")

</div>

For Example, I have a organisation called Elastic and its having multiple products.

I want search "loghash" in Elastic.

"bool" =\> [  
"must" =\> [  
"match" =\> [  
"organisation" =\> "Elastic"  
],  
"match" =\> [  
"product" =\> "loghash"  
]  
]  
]

I need this query in 1.7

I have tried this in 2.3 but its returns only one match.

Please help me. Thanks in advance.

---

<div class="post-metadata">

**Author:** ![cbuescher](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cbuescher/32/60402_2.png) [@cbuescher](https://discuss.elastic.co/u/cbuescher)\
**Post date:** [August 2, 2016, 9:36am UTC](https://discuss.elastic.co/t/search-with-multiple-keywords-in-elastic/56984/2 "2016-08-02T09:36:28Z")

</div>

Can you provide the exact example document that you think should match from your index? Also your mappings play an important role in these kind of question.

---

<div class="post-metadata">

**Author:** ![1222kkk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/1222kkk/32/23635_2.png) [@1222kkk](https://discuss.elastic.co/u/1222kkk)\
**Post date:** [August 2, 2016, 10:04am UTC](https://discuss.elastic.co/t/search-with-multiple-keywords-in-elastic/56984/3 "2016-08-02T10:04:30Z")

</div>

```
"bool" => [
"must" => [[
"match" => [
"organisation" => "Elastic"
],
"match" => [
"product" => "loghash"
]
]
]
]

```

maybe this?....

---

<div class="post-metadata">

**Author:** ![Muru](https://avatars.discourse-cdn.com/v4/letter/m/779978/32.png) [@Muru](https://discuss.elastic.co/u/Muru)\
**Post date:** [August 2, 2016, 10:16am UTC](https://discuss.elastic.co/t/search-with-multiple-keywords-in-elastic/56984/4 "2016-08-02T10:16:43Z")

</div>

Hi Christoph,

I have index like organisation and product in Elastic. Organisations have multiple products.

I need to search product in organisation.

For this i have two keywords, one must match organisation name and another one is product

---

<div class="post-metadata">

**Author:** ![Muru](https://avatars.discourse-cdn.com/v4/letter/m/779978/32.png) [@Muru](https://discuss.elastic.co/u/Muru)\
**Post date:** [August 2, 2016, 10:17am UTC](https://discuss.elastic.co/t/search-with-multiple-keywords-in-elastic/56984/5 "2016-08-02T10:17:52Z")

</div>

Hi, this is not working. Its only returns organisation match not product match

---

<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 5, 2017, 10:30pm UTC](https://discuss.elastic.co/t/search-with-multiple-keywords-in-elastic/56984/6 "2017-07-05T22:30:55Z")

</div>


