26
26
import org .apache .lucene .analysis .Tokenizer ;
27
27
import org .apache .lucene .analysis .core .KeywordTokenizer ;
28
28
import org .apache .lucene .analysis .tokenattributes .CharTermAttribute ;
29
- import org .elasticsearch .common .settings .ImmutableSettings ;
30
29
import org .elasticsearch .common .settings .Settings ;
31
30
import org .elasticsearch .test .ElasticsearchTestCase ;
32
31
import org .junit .Test ;
@@ -48,7 +47,7 @@ public class SimpleIcuCollationTokenFilterTests extends ElasticsearchTestCase {
48
47
*/
49
48
@ Test
50
49
public void testBasicUsage () throws Exception {
51
- Settings settings = ImmutableSettings .settingsBuilder ()
50
+ Settings settings = Settings .settingsBuilder ()
52
51
.put ("path.home" , createTempDir ())
53
52
.put ("index.analysis.filter.myCollator.type" , "icu_collation" )
54
53
.put ("index.analysis.filter.myCollator.language" , "tr" )
@@ -65,7 +64,7 @@ public void testBasicUsage() throws Exception {
65
64
*/
66
65
@ Test
67
66
public void testNormalization () throws IOException {
68
- Settings settings = ImmutableSettings .settingsBuilder ()
67
+ Settings settings = Settings .settingsBuilder ()
69
68
.put ("path.home" , createTempDir ())
70
69
.put ("index.analysis.filter.myCollator.type" , "icu_collation" )
71
70
.put ("index.analysis.filter.myCollator.language" , "tr" )
@@ -83,7 +82,7 @@ public void testNormalization() throws IOException {
83
82
*/
84
83
@ Test
85
84
public void testSecondaryStrength () throws IOException {
86
- Settings settings = ImmutableSettings .settingsBuilder ()
85
+ Settings settings = Settings .settingsBuilder ()
87
86
.put ("path.home" , createTempDir ())
88
87
.put ("index.analysis.filter.myCollator.type" , "icu_collation" )
89
88
.put ("index.analysis.filter.myCollator.language" , "en" )
@@ -102,7 +101,7 @@ public void testSecondaryStrength() throws IOException {
102
101
*/
103
102
@ Test
104
103
public void testIgnorePunctuation () throws IOException {
105
- Settings settings = ImmutableSettings .settingsBuilder ()
104
+ Settings settings = Settings .settingsBuilder ()
106
105
.put ("path.home" , createTempDir ())
107
106
.put ("index.analysis.filter.myCollator.type" , "icu_collation" )
108
107
.put ("index.analysis.filter.myCollator.language" , "en" )
@@ -121,7 +120,7 @@ public void testIgnorePunctuation() throws IOException {
121
120
*/
122
121
@ Test
123
122
public void testIgnoreWhitespace () throws IOException {
124
- Settings settings = ImmutableSettings .settingsBuilder ()
123
+ Settings settings = Settings .settingsBuilder ()
125
124
.put ("path.home" , createTempDir ())
126
125
.put ("index.analysis.filter.myCollator.type" , "icu_collation" )
127
126
.put ("index.analysis.filter.myCollator.language" , "en" )
@@ -143,7 +142,7 @@ public void testIgnoreWhitespace() throws IOException {
143
142
*/
144
143
@ Test
145
144
public void testNumerics () throws IOException {
146
- Settings settings = ImmutableSettings .settingsBuilder ()
145
+ Settings settings = Settings .settingsBuilder ()
147
146
.put ("path.home" , createTempDir ())
148
147
.put ("index.analysis.filter.myCollator.type" , "icu_collation" )
149
148
.put ("index.analysis.filter.myCollator.language" , "en" )
@@ -161,7 +160,7 @@ public void testNumerics() throws IOException {
161
160
*/
162
161
@ Test
163
162
public void testIgnoreAccentsButNotCase () throws IOException {
164
- Settings settings = ImmutableSettings .settingsBuilder ()
163
+ Settings settings = Settings .settingsBuilder ()
165
164
.put ("path.home" , createTempDir ())
166
165
.put ("index.analysis.filter.myCollator.type" , "icu_collation" )
167
166
.put ("index.analysis.filter.myCollator.language" , "en" )
@@ -183,7 +182,7 @@ public void testIgnoreAccentsButNotCase() throws IOException {
183
182
*/
184
183
@ Test
185
184
public void testUpperCaseFirst () throws IOException {
186
- Settings settings = ImmutableSettings .settingsBuilder ()
185
+ Settings settings = Settings .settingsBuilder ()
187
186
.put ("path.home" , createTempDir ())
188
187
.put ("index.analysis.filter.myCollator.type" , "icu_collation" )
189
188
.put ("index.analysis.filter.myCollator.language" , "en" )
@@ -214,7 +213,7 @@ public void testCustomRules() throws Exception {
214
213
RuleBasedCollator tailoredCollator = new RuleBasedCollator (baseCollator .getRules () + DIN5007_2_tailorings );
215
214
String tailoredRules = tailoredCollator .getRules ();
216
215
217
- Settings settings = ImmutableSettings .settingsBuilder ()
216
+ Settings settings = Settings .settingsBuilder ()
218
217
.put ("path.home" , createTempDir ())
219
218
.put ("index.analysis.filter.myCollator.type" , "icu_collation" )
220
219
.put ("index.analysis.filter.myCollator.rules" , tailoredRules )
0 commit comments