# Making hostname.com into two tokens

**URL:** <https://discuss.elastic.co/t/making-hostname-com-into-two-tokens/53588>\
**Category:** Elasticsearch\
**Created:** [June 22, 2016, 12:25am UTC](https://discuss.elastic.co/t/making-hostname-com-into-two-tokens/53588 "2016-06-22T00:25:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![drs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/drs/32/8001_2.png) [@drs](https://discuss.elastic.co/u/drs)\
**Post date:** [June 22, 2016, 12:25am UTC](https://discuss.elastic.co/t/making-hostname-com-into-two-tokens/53588/1 "2016-06-22T00:25:09Z")

</div>

I have a multi-lingual, free-text dataset that contains some domain names within the text. I am finding that searching for just the hostname portion of a domain does not yield results because the standard analyzer does not split tokens on periods. (I think this explained here: [http://unicode.org/reports/tr29/#Word\_Boundaries](http://unicode.org/reports/tr29/#Word_Boundaries))

I imagine there is a lot of work baked in to the standard tokenizer so that it yields the best results on multilingual data and so I don't want to switch tokenizers because of this one use case.

One thought I had would be to add a [mapping char filter](https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-mapping-charfilter.html) that maps periods to spaces, but I can't say I know all of the side-effects of this and am wondering if there is a more elegant solution.

Is there any other way to tweak the tokenizer such that it will split [hostname.com](http://hostname.com) into two tokens?

---

<div class="post-metadata">

**Author:** ![drs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/drs/32/8001_2.png) [@drs](https://discuss.elastic.co/u/drs)\
**Post date:** [June 22, 2016, 1:06am UTC](https://discuss.elastic.co/t/making-hostname-com-into-two-tokens/53588/2 "2016-06-22T01:06:15Z")

</div>

For what it's worth, the tokenizer used here on [discuss.elastic.co](http://discuss.elastic.co) apparently splits "[hostname.com](http://hostname.com)" into two tokens. Doing a search for "hostname" returns this topic with **hostname**.com emphasized like so.

---

<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 5, 2017, 10:41pm UTC](https://discuss.elastic.co/t/making-hostname-com-into-two-tokens/53588/3 "2017-07-05T22:41:36Z")

</div>


