I am trying to find out how a search can be implemented well for the German language. My problem is that German allows to easily create compound words. To allow to search for them I have created a compound dictionary and added to an analyser. When I use the analyser to search for "Webentwickler" (web developer):
{
"tokenizer": "standard",
"filter": [
{
"type": "dictionary_decompounder",
"word_list": ["web"]
}
],
"text": "webentwickler"
}
it returns the tokens ["webentwickler", "web"].
Now when I am searching for job ads with "webentwickler" I have the problem that either I enforce the search to use all tokens and therefore do not find "web entwickler" jobs ("webentwickler" is not in the job posting) or I do not enfore to search all tokens and also get a lot job adds with only the word "web" in it. Therefore I would need an analyser solution that returns the tokens ["web", "entwickler"] - I only want to split the word and add it split to the tokens.
How can I implement a search that uses a compound word list but allow to enforce that all compound split tokens must occur in the result?