Skip to content

Commit

Permalink
Fix Beider-Morse phonetic encoder silent fail when languageset not sp…
Browse files Browse the repository at this point in the history
…ecified #26771 (fix author)
  • Loading branch information
bkazez committed Oct 2, 2017
1 parent f79842b commit 9de5011
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -116,7 +116,7 @@ public PhoneticTokenFilterFactory(IndexSettings indexSettings, Environment envir
public TokenStream create(TokenStream tokenStream) {
if (encoder == null) {
if (ruletype != null && nametype != null) {
if (languageset != null) {
if (languageset != null && languageset.length > 0) {
final LanguageSet languages = LanguageSet.from(new HashSet<>(Arrays.asList(languageset)));
return new BeiderMorseFilter(tokenStream, new PhoneticEngine(nametype, ruletype, true), languages);
}
Expand Down

0 comments on commit 9de5011

Please sign in to comment.