# How to generate 2 tokens out of 1 token with special character in Elasticsearch (german language)

**URL:** https://discuss.elastic.co/t/how-to-generate-2-tokens-out-of-1-token-with-special-character-in-elasticsearch-german-language/99286
**Category:** Elasticsearch
**Created:** [September 4, 2017, 11:29am UTC](https://discuss.elastic.co/t/how-to-generate-2-tokens-out-of-1-token-with-special-character-in-elasticsearch-german-language/99286 "2017-09-04T11:29:58Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![korara00](https://avatars.discourse-cdn.com/v4/letter/k/ecd19e/32.png) [@korara00](https://discuss.elastic.co/u/korara00)
#### Post date: [September 4, 2017, 11:29am UTC](https://discuss.elastic.co/t/how-to-generate-2-tokens-out-of-1-token-with-special-character-in-elasticsearch-german-language/99286/1 "2017-09-04T11:29:58Z")

</div>

Hello,

I am trying to define a pattern/rule in Elasticsearch which creates 2tokens out of 1token with a special character.

Example:

" **Servicekaufmann/-frau**"

should generate the following 2 tokens:

" **Servicekaufmann**"  
" **Servicekauffrau**"

The pattern/rule should convert:

"\ ***kaufmann/-frau**"

into

"\ ***kaufmann**"  
"\ ***kauffrau**"

so that not only " **Servicekaufmann/-frau**" would be converted but also other expressions e.g.  
" **Industrykaufmann/-frau**" or in general any other "\ ***kaufmann/-frau**".

So far I have tried many different tokenfilters and workarounds but couldn't get the expected output and having right now a hard time (blocker).

Thank you in advance!

---

<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: [October 2, 2017, 11:37am UTC](https://discuss.elastic.co/t/how-to-generate-2-tokens-out-of-1-token-with-special-character-in-elasticsearch-german-language/99286/2 "2017-10-02T11:37:31Z")

</div>

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