# Help Getting Exact matches on text field

**URL:** <https://discuss.elastic.co/t/help-getting-exact-matches-on-text-field/234905>\
**Category:** Elasticsearch\
**Created:** [May 29, 2020, 10:39am UTC](https://discuss.elastic.co/t/help-getting-exact-matches-on-text-field/234905 "2020-05-29T10:39:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Babis\_Kokmotos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/babis_kokmotos/32/69374_2.png) [@Babis\_Kokmotos](https://discuss.elastic.co/u/Babis_Kokmotos)\
**Post date:** [May 29, 2020, 10:39am UTC](https://discuss.elastic.co/t/help-getting-exact-matches-on-text-field/234905/1 "2020-05-29T10:39:04Z")

</div>

Hey guys , i am facing an issue with exact match on text fields.

i am using the keyword analyzer during mapping but i have an exact match requirement.

Example data item1 : "Hamburger" ,item2: "Big Hamburger

my issue is that when i search for exact q = Hamburger i get Big Hamburger as well ...

Desired behaviour q= Hamburger only Hamburger comes back not

> \*Hamburger

or

> `Hamburger*`

in other searches i have the concept of startsWith endsWith and contains ( all good there )

i tried match and terms queries also span\_near with slop 0

thanks in advance!

---

<div class="post-metadata">

**Author:** ![Babis\_Kokmotos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/babis_kokmotos/32/69374_2.png) [@Babis\_Kokmotos](https://discuss.elastic.co/u/Babis_Kokmotos)\
**Post date:** [May 29, 2020, 12:05pm UTC](https://discuss.elastic.co/t/help-getting-exact-matches-on-text-field/234905/2 "2020-05-29T12:05:42Z")

</div>

solved the issue by creating an extra field

```auto
  "noindex":{
    type:"keyword" ,
    index:true }

```

and using that one to search in the full text !

---

<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:** [June 26, 2020, 12:05pm UTC](https://discuss.elastic.co/t/help-getting-exact-matches-on-text-field/234905/3 "2020-06-26T12:05:50Z")

</div>

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