# How to make the query for \_all so that it will not treat email as two substrings

**URL:** <https://discuss.elastic.co/t/how-to-make-the-query-for--all-so-that-it-will-not-treat-email-as-two-substrings/11626>\
**Category:** Elasticsearch\
**Created:** [April 18, 2013, 8:30am UTC](https://discuss.elastic.co/t/how-to-make-the-query-for--all-so-that-it-will-not-treat-email-as-two-substrings/11626 "2013-04-18T08:30:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![choudharynarendra](https://avatars.discourse-cdn.com/v4/letter/c/dbc845/32.png) [@choudharynarendra](https://discuss.elastic.co/u/choudharynarendra)\
**Post date:** [April 18, 2013, 8:30am UTC](https://discuss.elastic.co/t/how-to-make-the-query-for--all-so-that-it-will-not-treat-email-as-two-substrings/11626/1 "2013-04-18T08:30:52Z")

</div>

Hi ,

I am using the free text search with \_all on email for eg

[\_all:narendra.choudhary@gmail.com](mailto:_all:narendra.choudhary@gmail.com)

but it is making the parts into the narendra.choudhary and  
gmail.combacause of special character ..

My mapping for the analyser is "analyzer": {  
"auto\_complete": {  
"type": "custom",  
"tokenizer": "whitespace",  
"tokenizer": "uax\_url\_email",  
"filter": [  
"stop",  
"standard",  
"custom\_ngram"  
]  
}  
}

but it is not working ...

Could any one tell me how to make it correctly.

--  
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:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [April 18, 2013, 10:37pm UTC](https://discuss.elastic.co/t/how-to-make-the-query-for--all-so-that-it-will-not-treat-email-as-two-substrings/11626/2 "2013-04-18T22:37:37Z")

</div>

You need to define your analyzer as default analyzer. Here is an example:

> <https://github.com/imotov/elasticsearch-test-scripts/blob/master/email_default_analyzer.sh>

On Thursday, April 18, 2013 4:30:52 AM UTC-4, narendra choudhary wrote:

> Hi ,
> 
> I am using the free text search with \_all on email for eg
> 
> [\_all:narendr...@gmail.com](mailto:_all:narendr...@gmail.com) \<javascript:\>
> 
> but it is making the parts into the narendra.choudhary and gmail.combacause of special character ..
> 
> My mapping for the analyser is "analyzer": {  
> "auto\_complete": {  
> "type": "custom",  
> "tokenizer": "whitespace",  
> "tokenizer": "uax\_url\_email",  
> "filter": [  
> "stop",  
> "standard",  
> "custom\_ngram"  
> ]  
> }  
> }
> 
> but it is not working ...
> 
> Could any one tell me how to make it correctly.

--  
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:40am UTC](https://discuss.elastic.co/t/how-to-make-the-query-for--all-so-that-it-will-not-treat-email-as-two-substrings/11626/3 "2017-07-06T02:40:33Z")

</div>


