# Part-of-word matching challenge

**URL:** <https://discuss.elastic.co/t/part-of-word-matching-challenge/74709>\
**Category:** Elasticsearch\
**Created:** [February 10, 2017, 8:16pm UTC](https://discuss.elastic.co/t/part-of-word-matching-challenge/74709 "2017-02-10T20:16:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maarten\_Roosendaal](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@Maarten\_Roosendaal](https://discuss.elastic.co/u/Maarten_Roosendaal)\
**Post date:** [February 10, 2017, 8:16pm UTC](https://discuss.elastic.co/t/part-of-word-matching-challenge/74709/1 "2017-02-10T20:16:09Z")

</div>

Hi,

We're looking for a way to match on part of words for single term queries but not all words.

For example (it's dutch):

- searching for 'verlichting' should match on 'tuinverlichting' or 'wandverlichting' but
- searching for 'pop' should NOT match on 'popular'
- searching for 'bed' should match on 'beddengoed' or 'dekbedden' but NOT on 'bedrading' or bedrijf'

What is the best strategy?

Maarten

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [February 11, 2017, 11:20pm UTC](https://discuss.elastic.co/t/part-of-word-matching-challenge/74709/2 "2017-02-11T23:20:01Z")

</div>

One method is to implement a word decompounding token filter for dutch language.

---

<div class="post-metadata">

**Author:** ![Maarten\_Roosendaal](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@Maarten\_Roosendaal](https://discuss.elastic.co/u/Maarten_Roosendaal)\
**Post date:** [February 12, 2017, 7:11am UTC](https://discuss.elastic.co/t/part-of-word-matching-challenge/74709/3 "2017-02-12T07:11:27Z")

</div>

Hi,

Thanks for your reply. I've looked at [https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-compound-word-tokenfilter.html#\_dictionary\_decompounder](https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-compound-word-tokenfilter.html#_dictionary_decompounder) but the documentation is lacking.

I've tried, see [https://gist.github.com/anonymous/f6f3067b02af50928751127a1e351e63](https://gist.github.com/anonymous/f6f3067b02af50928751127a1e351e63)  
but somehow it does not work at all.

Maybe you can spot the errror? I'm using es 5.2.

Is this what you meant by the way?

Thanks,  
Maarten

---

<div class="post-metadata">

**Author:** ![Maarten\_Roosendaal](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@Maarten\_Roosendaal](https://discuss.elastic.co/u/Maarten_Roosendaal)\
**Post date:** [February 13, 2017, 2:36pm UTC](https://discuss.elastic.co/t/part-of-word-matching-challenge/74709/4 "2017-02-13T14:36:31Z")

</div>

figured out the problem of decompounding, had to do because i put the quotes around the [ in stead of only the words. And in combination with stemmer\_override i could manually override words for stemming i got better results.

---

<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 13, 2017, 2:36pm UTC](https://discuss.elastic.co/t/part-of-word-matching-challenge/74709/5 "2017-03-13T14:36:38Z")

</div>

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