# How To Search the Documents with Phrase and other Keyword with in slop

**URL:** <https://discuss.elastic.co/t/how-to-search-the-documents-with-phrase-and-other-keyword-with-in-slop/301779>\
**Category:** Elasticsearch\
**Tags:** kql-kibana-query-language\
**Created:** [April 6, 2022, 2:50pm UTC](https://discuss.elastic.co/t/how-to-search-the-documents-with-phrase-and-other-keyword-with-in-slop/301779 "2022-04-06T14:50:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![santhuuu0007](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/santhuuu0007/32/29699_2.png) [@santhuuu0007](https://discuss.elastic.co/u/santhuuu0007)\
**Post date:** [April 6, 2022, 2:50pm UTC](https://discuss.elastic.co/t/how-to-search-the-documents-with-phrase-and-other-keyword-with-in-slop/301779/1 "2022-04-06T14:50:36Z")

</div>

Hi,

We are working on analyzing the documents here We have got description field in my document.

We have the query for matching the phrase with slop which looks beautiful.  
i.e. **"Certified Operator"** when we use this with match phrase with slop 2 looks good.

But We don't want to miss any document with Phrase and Keyword with in 20 words like  
Phrase Query: " **Municipal Fire Alarm System Technician Level** I"  
Keyword: " **Certification**"

How can we achive.

---

<div class="post-metadata">

**Author:** ![RabBit\_BR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rabbit_br/32/82261_2.png) [@RabBit\_BR](https://discuss.elastic.co/u/RabBit_BR)\
**Post date:** [April 6, 2022, 4:42pm UTC](https://discuss.elastic.co/t/how-to-search-the-documents-with-phrase-and-other-keyword-with-in-slop/301779/2 "2022-04-06T16:42:21Z")

</div>

Do you use the term "Certification" as a filter in the search for the term "Municipal Fire Alarm System Technician Level I"?

---

<div class="post-metadata">

**Author:** ![santhuuu0007](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/santhuuu0007/32/29699_2.png) [@santhuuu0007](https://discuss.elastic.co/u/santhuuu0007)\
**Post date:** [April 6, 2022, 7:03pm UTC](https://discuss.elastic.co/t/how-to-search-the-documents-with-phrase-and-other-keyword-with-in-slop/301779/3 "2022-04-06T19:03:44Z")

</div>

> [@RabBit\_BR](#):
>
> ou use the term "Certification" as a filter in the search for the term "Municipal Fire Alarm System Technician Level I"?

Thank you for your answer!  
But that brings all the document with both the filters,

but not the **"Certification" Keyword in range between 20words.**

---

<div class="post-metadata">

**Author:** ![RabBit\_BR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rabbit_br/32/82261_2.png) [@RabBit\_BR](https://discuss.elastic.co/u/RabBit_BR)\
**Post date:** [April 9, 2022, 7:35pm UTC](https://discuss.elastic.co/t/how-to-search-the-documents-with-phrase-and-other-keyword-with-in-slop/301779/4 "2022-04-09T19:35:21Z")

</div>

Maybe you already solved the problem. If not, can you inform the mapping and an example document?

---

<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:** [May 7, 2022, 7:36pm UTC](https://discuss.elastic.co/t/how-to-search-the-documents-with-phrase-and-other-keyword-with-in-slop/301779/5 "2022-05-07T19:36:10Z")

</div>

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