- Moved if statement that checks if all query substrings are matched into a funciton
- convert into shorthand expression the if statement that checks if all words are fully matched
- Move checking if there is a prev compare string char match into function
- Move updating of index list when a better match is found for the first substring logic into function
Flag is used in method "ShouldUsePinyin()" to avoid calling Alphabet
service. Otherwise, tests applying to StringMatcher.FuzzySearch() would
fail because the pinyin helper library fails to initialize.
The MatchResult will always get the maximum score from either
ScoreForPinyin() or CalculateSearchScore(). ScoreForPinyin() is
completely dependant on the "ShouldUsePinyin" global setting.
The search precision must be used, so it makes sense to apply the filter
directly on score assignment. Score will be "0" if precision filter
was not met.