I am facing an issue with highlighting of multi-synonym word in search response. Our ES version is 5.x .The issue is that if a synonym word is present at the beginning or at the end of the sentence, then part of the synonym word is cut-off.
For example, if the synonym for "Asthma" is " Severe Asthma" then if " Severe Asthma" is present at the beginning or at the end of the sentence then it becomes 'Severe' and the remaining sentence(Asthma) is cut-off at the end.
Also if " Severe Asthma" is at the beginning of sentence, then the highlight appear as 'Asthma' with "Severe" missing or cut-off.
Can anyone suggest any solution here please.