# Exact match query

**URL:** <https://discuss.elastic.co/t/exact-match-query/18804>\
**Category:** Elasticsearch\
**Created:** [July 22, 2014, 8:57pm UTC](https://discuss.elastic.co/t/exact-match-query/18804 "2014-07-22T20:57:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![IronMike](https://avatars.discourse-cdn.com/v4/letter/i/e9a140/32.png) [@IronMike](https://discuss.elastic.co/u/IronMike)\
**Post date:** [July 22, 2014, 8:57pm UTC](https://discuss.elastic.co/t/exact-match-query/18804/1 "2014-07-22T20:57:35Z")

</div>

I would like to match multiple of exact phrases, is it possible?

I would like to search in one field "myfield" for exact phrases: "My exact  
phrase 1" & "My exact phrase 2"

//This is code for one phrase match, how to combine with the other?  
"query": {  
"match\_phrase": {  
"myfield": "My exact phrase 1"  
}  
}

--  
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/50032da6-bb6b-4e47-8ade-0e2d0d3315c8%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/50032da6-bb6b-4e47-8ade-0e2d0d3315c8%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [August 4, 2014, 8:25am UTC](https://discuss.elastic.co/t/exact-match-query/18804/2 "2014-08-04T08:25:45Z")

</div>

Hey,

you could use a bool query with several must clauses, which in turn contain  
several match\_phrase clauses. See

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

--Alex

On Tue, Jul 22, 2014 at 10:57 PM, IronMike [sabdalla80@gmail.com](mailto:sabdalla80@gmail.com) wrote:

> I would like to match multiple of exact phrases, is it possible?
> 
> I would like to search in one field "myfield" for exact phrases: "My exact  
> phrase 1" & "My exact phrase 2"
> 
> //This is code for one phrase match, how to combine with the other?  
> "query": {  
> "match\_phrase": {  
> "myfield": "My exact phrase 1"  
> }  
> }
> 
> --  
> 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/50032da6-bb6b-4e47-8ade-0e2d0d3315c8%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/50032da6-bb6b-4e47-8ade-0e2d0d3315c8%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/50032da6-bb6b-4e47-8ade-0e2d0d3315c8%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/50032da6-bb6b-4e47-8ade-0e2d0d3315c8%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> 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/CAGCwEM9KKLGLh1gOnVNf1X--72FkVgLaYx90DKPPHb\_\_96E0tw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGCwEM9KKLGLh1gOnVNf1X--72FkVgLaYx90DKPPHb__96E0tw%40mail.gmail.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, 1:11am UTC](https://discuss.elastic.co/t/exact-match-query/18804/3 "2017-07-06T01:11:11Z")

</div>


