Manual:$wgSearchHighlightBoundaries

Details
Regexp to match word boundaries, defaults for non-CJK languages should be empty for CJK since the words are not separate.