# Compound Words not found but Filter is configured

**URL:** <https://discuss.elastic.co/t/compound-words-not-found-but-filter-is-configured/62355>\
**Category:** Elasticsearch\
**Created:** [October 6, 2016, 9:16am UTC](https://discuss.elastic.co/t/compound-words-not-found-but-filter-is-configured/62355 "2016-10-06T09:16:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Miku](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@Miku](https://discuss.elastic.co/u/Miku)\
**Post date:** [October 6, 2016, 9:16am UTC](https://discuss.elastic.co/t/compound-words-not-found-but-filter-is-configured/62355/1 "2016-10-06T09:16:40Z")

</div>

Hi guys,

i experiment with search phrases of german compound words. The testword is "kennenlernen" which consists of the two words "kennen" and "lernen".  
I configured the following settings to achive that i can find the word "kennenlernen" with the searchphrase "kennen".

Any ideas why this wont work or solutions for debugging the indexed terms?

Thanks a lot.

**Settings:**  
"analysis": {  
"filter": {  
"german\_stop": {  
"type": "stop",  
"stopwords": "_german_"  
},  
"german\_stemmer": {  
"type": "stemmer",  
"language": "light\_german"  
},  
"german\_compound\_filter": {  
"type": "dictionary\_decompounder",  
"word\_list": [  
"kennenlernen",  
"kennen",  
"lernen"  
],  
"min\_subword\_size": 2  
}  
},  
"analyzer": {  
"german\_mod": {  
"type": "custom",  
"tokenizer": "standard",  
"filter": [  
"lowercase",  
"german\_stop",  
"german\_normalization",  
"german\_stemmer",  
"german\_compound\_filter"  
]  
}  
}  
}

**Mapping:**  
"\_all": {  
"analyzer": "german\_mod"  
}

**Search with no hits:**  
"query": {  
"match": {  
"\_all": {  
"query": "kennen"  
}  
}  
}

**Search with one hit:**  
"query": {  
"match": {  
"\_all": {  
"query": "kennenlernen"  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![Miku](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@Miku](https://discuss.elastic.co/u/Miku)\
**Post date:** [October 7, 2016, 7:26am UTC](https://discuss.elastic.co/t/compound-words-not-found-but-filter-is-configured/62355/2 "2016-10-07T07:26:37Z")

</div>

Good Morning,

is there any possibility to debug / analyze the query process to find out why the query cant find a hit? Other ideas?

Thanks a lot.

---

<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:** [October 7, 2016, 9:09am UTC](https://discuss.elastic.co/t/compound-words-not-found-but-filter-is-configured/62355/3 "2016-10-07T09:09:27Z")

</div>

See [https://www.elastic.co/guide/en/elasticsearch/guide/current/\_validating\_queries.html](https://www.elastic.co/guide/en/elasticsearch/guide/current/_validating_queries.html)

---

<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:** [October 7, 2016, 9:10am UTC](https://discuss.elastic.co/t/compound-words-not-found-but-filter-is-configured/62355/4 "2016-10-07T09:10:46Z")

</div>

And also [https://www.elastic.co/guide/en/elasticsearch/reference/current/\_explain\_analyze.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/_explain_analyze.html)

---

<div class="post-metadata">

**Author:** ![Miku](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@Miku](https://discuss.elastic.co/u/Miku)\
**Post date:** [October 7, 2016, 11:49am UTC](https://discuss.elastic.co/t/compound-words-not-found-but-filter-is-configured/62355/5 "2016-10-07T11:49:14Z")

</div>

Hi,

thanks for your help. I replaced the Compound Filter with a ngram Tokenizer for a generic solution, this works for me.

Thanks

---

<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:14pm UTC](https://discuss.elastic.co/t/compound-words-not-found-but-filter-is-configured/62355/6 "2017-07-05T22:14:05Z")

</div>


