29
29
import org .apache .lucene .analysis .phonetic .BeiderMorseFilter ;
30
30
import org .apache .lucene .analysis .phonetic .DoubleMetaphoneFilter ;
31
31
import org .apache .lucene .analysis .phonetic .PhoneticFilter ;
32
- import org .elasticsearch .ElasticsearchIllegalArgumentException ;
33
32
import org .elasticsearch .common .inject .Inject ;
34
33
import org .elasticsearch .common .inject .assistedinject .Assisted ;
35
34
import org .elasticsearch .common .settings .Settings ;
@@ -90,7 +89,7 @@ public PhoneticTokenFilterFactory(Index index, @IndexSettings Settings indexSett
90
89
} else if ("exact" .equalsIgnoreCase (ruleType )) {
91
90
ruletype = RuleType .EXACT ;
92
91
} else {
93
- throw new ElasticsearchIllegalArgumentException ("No matching rule type [" + ruleType + "] for beider morse encoder" );
92
+ throw new IllegalArgumentException ("No matching rule type [" + ruleType + "] for beider morse encoder" );
94
93
}
95
94
String nameType = settings .get ("name_type" , "generic" );
96
95
if ("GENERIC" .equalsIgnoreCase (nameType )) {
@@ -107,7 +106,7 @@ public PhoneticTokenFilterFactory(Index index, @IndexSettings Settings indexSett
107
106
} else if ("nysiis" .equalsIgnoreCase (encodername )) {
108
107
this .encoder = new Nysiis ();
109
108
} else {
110
- throw new ElasticsearchIllegalArgumentException ("unknown encoder [" + encodername + "] for phonetic token filter" );
109
+ throw new IllegalArgumentException ("unknown encoder [" + encodername + "] for phonetic token filter" );
111
110
}
112
111
}
113
112
@@ -127,6 +126,6 @@ public TokenStream create(TokenStream tokenStream) {
127
126
} else {
128
127
return new PhoneticFilter (tokenStream , encoder , !replace );
129
128
}
130
- throw new ElasticsearchIllegalArgumentException ("encoder error" );
129
+ throw new IllegalArgumentException ("encoder error" );
131
130
}
132
131
}
0 commit comments