# UAX29 URL Email Tokenizer

**URL:** <https://discuss.elastic.co/t/uax29-url-email-tokenizer/168304>\
**Category:** Elasticsearch\
**Created:** [February 13, 2019, 10:52pm UTC](https://discuss.elastic.co/t/uax29-url-email-tokenizer/168304 "2019-02-13T22:52:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![avencar](https://avatars.discourse-cdn.com/v4/letter/a/6bbea6/32.png) [@avencar](https://discuss.elastic.co/u/avencar)\
**Post date:** [February 13, 2019, 10:52pm UTC](https://discuss.elastic.co/t/uax29-url-email-tokenizer/168304/1 "2019-02-13T22:52:32Z")

</div>

I am wondering if there are plans to implement a more advanced version of the current URL Email Tokenizer, such as the UAX29 one provided by solr ([https://lucene.apache.org/solr/guide/7\_3/tokenizers.html#uax29-url-email-tokenizer](https://lucene.apache.org/solr/guide/7_3/tokenizers.html#uax29-url-email-tokenizer))

The most useful features for us would be:

- Words are split at hyphens, unless there is a number in the word, in which case the token is not split and the numbers and hyphen(s) are preserved.
- Support for proper tokenization of IP addresses (in particular, IPv6 addresses are not tokenized properly with the ES version of the url email tokenizer).

If not, how could I go about implementing a custom tokenizer?

---

<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:** [February 15, 2019, 9:08am UTC](https://discuss.elastic.co/t/uax29-url-email-tokenizer/168304/2 "2019-02-15T09:08:06Z")

</div>

can you share a concrete example what is not working? This one here for example works in 6.6.0

```auto
POST _analyze
{
  "tokenizer": "uax_url_email",
  "text": "http://[2001:4860:0:2001::68]/ test me"
}

```

Thanks!

---

<div class="post-metadata">

**Author:** ![avencar](https://avatars.discourse-cdn.com/v4/letter/a/6bbea6/32.png) [@avencar](https://discuss.elastic.co/u/avencar)\
**Post date:** [February 15, 2019, 3:26pm UTC](https://discuss.elastic.co/t/uax29-url-email-tokenizer/168304/3 "2019-02-15T15:26:38Z")

</div>

I apologize for not being more specific. We would like for proper tokenization of IPv6 addresses not embedded in a URL or email address. Please see my example below demonstrating the 2 features of the UAX29-url-email-tokenizer in Solr that we are looking for.

Ideally, we would like two tokens returned: "2001:4860:0:2001::68" and "CVE-123-456". That's currently not the case.

```auto
POST _analyze
{
  "tokenizer": "uax_url_email",
  "text": "2001:4860:0:2001::68 CVE-123-456"
}

```

Thanks for the help!

---

<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:** [March 15, 2019, 3:26pm UTC](https://discuss.elastic.co/t/uax29-url-email-tokenizer/168304/4 "2019-03-15T15:26:38Z")

</div>

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