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

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? :slight_smile:

How as the field been mapped in ES?