# Searches on fields containing dashes (like UUID) yields multiple results, how to improve search?

**URL:** https://discuss.elastic.co/t/searches-on-fields-containing-dashes-like-uuid-yields-multiple-results-how-to-improve-search/53836
**Category:** Elasticsearch
**Created:** [June 23, 2016, 9:41pm UTC](https://discuss.elastic.co/t/searches-on-fields-containing-dashes-like-uuid-yields-multiple-results-how-to-improve-search/53836 "2016-06-23T21:41:43Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![danielkwinsor](https://avatars.discourse-cdn.com/v4/letter/d/71c47a/32.png) [@danielkwinsor](https://discuss.elastic.co/u/danielkwinsor)
#### Post date: [June 23, 2016, 9:41pm UTC](https://discuss.elastic.co/t/searches-on-fields-containing-dashes-like-uuid-yields-multiple-results-how-to-improve-search/53836/1 "2016-06-23T21:41:43Z")

</div>

Hi there,

Suppose I've got a bunch of random\*\* UUIDs in the 8-4-4-4-12 format, such as

- 28d81f89-12f6-4fb2-9499-40c9c2ff9a0d
- 0498C181-12F6-4FB2-971D-9B4557CAF099
- e4266491-12f6-4714-a12e-9f02c619a0ca
- EB414BC3-12F6-475E-B800-3D141F4A8862

You may have noticed they all have -12F6- in common.  
I'm attempting to do a "match" query on an index with one of these UUIDs, but I get all of these. Apparently "match" is acting like a multiword query where '-' is the delimiter.  
"match\_phrase" does work for me by returning just 1 result, which makes sense when you think of it as 5 words... but it's not intuitive.

Is there a better way to search for this exact UUID string?

\*\*Philosophical question, are these UUIDs still random if I picked them out and posted them here? 🙂

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [June 25, 2016, 8:55pm UTC](https://discuss.elastic.co/t/searches-on-fields-containing-dashes-like-uuid-yields-multiple-results-how-to-improve-search/53836/2 "2016-06-25T20:55:27Z")

</div>

How as the field been mapped in ES?

---

<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 5, 2017, 10:40pm UTC](https://discuss.elastic.co/t/searches-on-fields-containing-dashes-like-uuid-yields-multiple-results-how-to-improve-search/53836/3 "2017-07-05T22:40:29Z")

</div>


