# Problem with uax\_url\_email tokenizer with pattern capture filter

**URL:** <https://discuss.elastic.co/t/problem-with-uax-url-email-tokenizer-with-pattern-capture-filter/108834>\
**Category:** Elasticsearch\
**Created:** [November 23, 2017, 8:11am UTC](https://discuss.elastic.co/t/problem-with-uax-url-email-tokenizer-with-pattern-capture-filter/108834 "2017-11-23T08:11:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Madhur\_Tandon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/madhur_tandon/32/24595_2.png) [@Madhur\_Tandon](https://discuss.elastic.co/u/Madhur_Tandon)\
**Post date:** [November 23, 2017, 8:11am UTC](https://discuss.elastic.co/t/problem-with-uax-url-email-tokenizer-with-pattern-capture-filter/108834/1 "2017-11-23T08:11:14Z")

</div>

Using tokenizer uax\_url\_email and filter lowercase, email\_filter, unique

email\_filter:  
"type" =\> "pattern\_capture",  
"preserve\_original" =\> true,  
"patterns" =\> [  
"([^@]+)",  
"(\p{L}+)",  
"(\d+)",  
"@(.+)"  
]

Now if we try to analyse the text s@test.club, then it get tokenise like:  
{  
"tokens": [  
{  
"token": "s@test.cl",  
"start\_offset": 0,  
"end\_offset": 9,  
"type": "",  
"position": 0  
},  
{  
"token": "s",  
"start\_offset": 0,  
"end\_offset": 9,  
"type": "",  
"position": 0  
},  
{  
"token": "s",  
"start\_offset": 0,  
"end\_offset": 9,  
"type": "",  
"position": 0  
},  
{  
"token": "[test.cl](http://test.cl)",  
"start\_offset": 0,  
"end\_offset": 9,  
"type": "",  
"position": 0  
},  
{  
"token": "test",  
"start\_offset": 0,  
"end\_offset": 9,  
"type": "",  
"position": 0  
},  
{  
"token": "cl",  
"start\_offset": 0,  
"end\_offset": 9,  
"type": "",  
"position": 0  
},  
{  
"token": "ub",  
"start\_offset": 9,  
"end\_offset": 11,  
"type": "",  
"position": 1  
}  
]  
}

Problem:  
Why it is not preserving the original(s@test.club) one when it is tokenising the text

---

<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:** [December 21, 2017, 8:11am UTC](https://discuss.elastic.co/t/problem-with-uax-url-email-tokenizer-with-pattern-capture-filter/108834/2 "2017-12-21T08:11:15Z")

</div>

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