# Inaccurate Matching in Email Strings

**URL:** <https://discuss.elastic.co/t/inaccurate-matching-in-email-strings/13808>\
**Category:** Elasticsearch\
**Created:** [September 30, 2013, 11:49pm UTC](https://discuss.elastic.co/t/inaccurate-matching-in-email-strings/13808 "2013-09-30T23:49:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steve\_Xian](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steve_xian/32/2088_2.png) [@Steve\_Xian](https://discuss.elastic.co/u/Steve_Xian)\
**Post date:** [September 30, 2013, 11:49pm UTC](https://discuss.elastic.co/t/inaccurate-matching-in-email-strings/13808/1 "2013-09-30T23:49:34Z")

</div>

Hey guys, here is my query:  
{  
"query": {  
"bool": {  
"minimum\_should\_match": 1,  
"must": [],  
"must\_not": [],  
"should": [  
{  
"query\_string": {  
"fields": [  
"emailAddress"  
],  
"query": "test@abc.com"  
}  
}  
]  
}  
},  
"from": 0,  
"size": 25  
}

whenever I run this, I would also get back results that have emails that  
dont match [test@abc.com](mailto:test@abc.com), such as [hi@abc.com](mailto:hi@abc.com)

If i switch the field to names, the searches will come back exact.

Is there a special meaning to the @ sign that's doing this?

Thx

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [October 1, 2013, 5:48am UTC](https://discuss.elastic.co/t/inaccurate-matching-in-email-strings/13808/2 "2013-10-01T05:48:46Z")

</div>

Hey,

check out the uax\_email\_url tokenizer, which will help you here

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

--Alex

On Tue, Oct 1, 2013 at 1:49 AM, Steve Xian [monkxly@gmail.com](mailto:monkxly@gmail.com) wrote:

> Hey guys, here is my query:  
> {  
> "query": {  
> "bool": {  
> "minimum\_should\_match": 1,  
> "must": ,  
> "must\_not": ,  
> "should": [  
> {  
> "query\_string": {  
> "fields": [  
> "emailAddress"  
> ],  
> "query": "[test@abc.com](mailto:test@abc.com)"  
> }  
> }  
> ]  
> }  
> },  
> "from": 0,  
> "size": 25  
> }
> 
> whenever I run this, I would also get back results that have emails that  
> dont match [test@abc.com](mailto:test@abc.com), such as [hi@abc.com](mailto:hi@abc.com)
> 
> If i switch the field to names, the searches will come back exact.
> 
> Is there a special meaning to the @ sign that's doing this?
> 
> Thx
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:14am UTC](https://discuss.elastic.co/t/inaccurate-matching-in-email-strings/13808/3 "2017-07-06T02:14:09Z")

</div>


