# How to do exact term matching?

**URL:** <https://discuss.elastic.co/t/how-to-do-exact-term-matching/7676>\
**Category:** Elasticsearch\
**Created:** [May 14, 2012, 9:23am UTC](https://discuss.elastic.co/t/how-to-do-exact-term-matching/7676 "2012-05-14T09:23:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lysd](https://avatars.discourse-cdn.com/v4/letter/l/91b2a8/32.png) [@lysd](https://discuss.elastic.co/u/lysd)\
**Post date:** [May 14, 2012, 9:23am UTC](https://discuss.elastic.co/t/how-to-do-exact-term-matching/7676/1 "2012-05-14T09:23:34Z")

</div>

Hi

This is my first in this group. Have only started to work on elasticsearch  
so am new to ES.

I'm trying to find out how do I get exact matches. For example,

"Foxconn preparing to build Apple HDTV?"  
"Foxconn boss confirms Apple TV set"‎

When I query for "Apple" I get both documents returned. If I query for  
"Apple HDTV" I still get both documents.

I've looked at the group, suggestions include "not\_analyzed" and "keyword"  
analyzer, both I've tried and failed. Have also tried to do bool query, and  
failed too.

Can any give me some clue?

Thanks in advance

D.

---

<div class="post-metadata">

**Author:** ![lysd](https://avatars.discourse-cdn.com/v4/letter/l/91b2a8/32.png) [@lysd](https://discuss.elastic.co/u/lysd)\
**Post date:** [May 14, 2012, 10:15am UTC](https://discuss.elastic.co/t/how-to-do-exact-term-matching/7676/2 "2012-05-14T10:15:22Z")

</div>

Nevermind, I found what I was looking for.

> **[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.

Thanks

On Monday, May 14, 2012 5:23:34 PM UTC+8, lysd wrote:

> Hi
> 
> This is my first in this group. Have only started to work on elasticsearch  
> so am new to ES.
> 
> I'm trying to find out how do I get exact matches. For example,
> 
> "Foxconn preparing to build Apple HDTV?"  
> "Foxconn boss confirms Apple TV set"‎
> 
> When I query for "Apple" I get both documents returned. If I query for  
> "Apple HDTV" I still get both documents.
> 
> I've looked at the group, suggestions include "not\_analyzed" and "keyword"  
> analyzer, both I've tried and failed. Have also tried to do bool query, and  
> failed too.
> 
> Can any give me some clue?
> 
> Thanks in advance
> 
> D.

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [May 15, 2012, 8:35pm UTC](https://discuss.elastic.co/t/how-to-do-exact-term-matching/7676/3 "2012-05-15T20:35:06Z")

</div>

Or, check the text query as well, more specifically phrase searches.

On Mon, May 14, 2012 at 1:15 PM, lysd [lysding@gmail.com](mailto:lysding@gmail.com) wrote:

> Nevermind, I found what I was looking for.
> 
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/query-dsl/query-string-query.html)
> 
> Thanks
> 
> On Monday, May 14, 2012 5:23:34 PM UTC+8, lysd wrote:
> 
> > Hi
> > 
> > This is my first in this group. Have only started to work on  
> > elasticsearch so am new to ES.
> > 
> > I'm trying to find out how do I get exact matches. For example,
> > 
> > "Foxconn preparing to build Apple HDTV?"  
> > "Foxconn boss confirms Apple TV set"‎
> > 
> > When I query for "Apple" I get both documents returned. If I query for  
> > "Apple HDTV" I still get both documents.
> > 
> > I've looked at the group, suggestions include "not\_analyzed" and  
> > "keyword" analyzer, both I've tried and failed. Have also tried to do bool  
> > query, and failed too.
> > 
> > Can any give me some clue?
> > 
> > Thanks in advance
> > 
> > D.

---

<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, 3:28am UTC](https://discuss.elastic.co/t/how-to-do-exact-term-matching/7676/4 "2017-07-06T03:28:42Z")

</div>


