# Edit New issue search exact value in hole type

**URL:** <https://discuss.elastic.co/t/edit-new-issue-search-exact-value-in-hole-type/84374>\
**Category:** Elasticsearch\
**Created:** [May 3, 2017, 8:36am UTC](https://discuss.elastic.co/t/edit-new-issue-search-exact-value-in-hole-type/84374 "2017-05-03T08:36:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![maralbe](https://avatars.discourse-cdn.com/v4/letter/m/6f9a4e/32.png) [@maralbe](https://discuss.elastic.co/u/maralbe)\
**Post date:** [May 3, 2017, 8:36am UTC](https://discuss.elastic.co/t/edit-new-issue-search-exact-value-in-hole-type/84374/1 "2017-05-03T08:36:30Z")

</div>

i want to search in my type..  
and wrote all my queries, and work fine.. here i have a challenge!  
i want to search in hole type... any field that exist, i wrote a query like this :  
`

```
"query" => [
  "bool" => [    
         "must" => [
                 "query_string" => [
                         "query" => $keyword_exact,
                          "boost" => 1
                     ]
              ]
       ]      

```

]  
`

it works, but i want to get documents with the exact query...  
for example: if i search sales... i want this exact word, not 'resalat' or 'Assaluyeh' or... because of having letters 'sal' .

this was my issue,  
i hope it's clear for you  
and thanks

---

<div class="post-metadata">

**Author:** ![polyfractal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/polyfractal/32/48162_2.png) [@polyfractal](https://discuss.elastic.co/u/polyfractal)\
**Post date:** [May 3, 2017, 8:23pm UTC](https://discuss.elastic.co/t/edit-new-issue-search-exact-value-in-hole-type/84374/2 "2017-05-03T20:23:54Z")

</div>

I suggest you start working through [Mapping and Anlaysis](https://www.elastic.co/guide/en/elasticsearch/guide/current/mapping-analysis.html) chapter of the Definitive Guide. You'll need to learn about how to properly map, analyze and search fields so that you can differentiate between exact values and partial matches.

That chapter walks through the theory behind it 🙂

---

<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 31, 2017, 8:30pm UTC](https://discuss.elastic.co/t/edit-new-issue-search-exact-value-in-hole-type/84374/3 "2017-05-31T20:30:21Z")

</div>

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