Hi,
I work on a german product search. To make things more clear I "translated" my problem to the following case:
lets assume I have four documents each containing one of the following words in my index:
"starlight"
"moonlight"
"lighthouse"
"lightbulb"
If I search now for "light", I of course won't find any.
So I define two (identical) analyzers that are used for the respective field for indexation and search. These analyzers only consists of a "dictionary_decompounder" with the "word_list" : ["light"].
So now of course I will find all 4 documents. If I now like to exclude "lightbulb" and "starlight" from the "light" search results, I add these two words to the "word_list" : ["light","lightbulb","starlight"] and activate "only_longest_match": "true".
Now I would expect only the "moonlight" and "lighthouse" documents if I search for "light" again.
Weirdly the "lightbulb" disappears as desired now, but I still get the "starlight" document returned (in addition to the expected "moonlight" and "lighthouse" documents).
This seems to be the case because in "lightbulb" "light" is at the start of the word, where in "starlight" it's at the end.
Does anyone have any idea how I can ensure that "starlight" doesn't show up when I search for "light" in this scenario?
Thanks