Skip to content

Commit b361c03

Browse files
committed
fixed locales names in analyzer tests
1 parent 2ddc4a7 commit b361c03

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

src/test/java/com/arangodb/ArangoSearchTest.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ public void stemAnalyzer() {
480480
options.setFeatures(features);
481481
options.setName(name);
482482
options.setType(AnalyzerType.stem);
483-
options.setProperties(Collections.singletonMap("locale", "ru.utf-8"));
483+
options.setProperties(Collections.singletonMap("locale", "ru"));
484484

485485
createGetAndDeleteAnalyzer(options);
486486
}
@@ -497,7 +497,7 @@ public void stemAnalyzerTyped() {
497497
features.add(AnalyzerFeature.position);
498498

499499
StemAnalyzerProperties properties = new StemAnalyzerProperties();
500-
properties.setLocale("ru.utf-8");
500+
properties.setLocale("ru");
501501

502502
StemAnalyzer options = new StemAnalyzer();
503503
options.setFeatures(features);
@@ -519,7 +519,7 @@ public void normAnalyzer() {
519519
features.add(AnalyzerFeature.position);
520520

521521
Map<String, Object> properties = new HashMap<>();
522-
properties.put("locale", "ru.utf-8");
522+
properties.put("locale", "ru");
523523
properties.put("case", "lower");
524524
properties.put("accent", true);
525525

@@ -544,7 +544,7 @@ public void normAnalyzerTyped() {
544544
features.add(AnalyzerFeature.position);
545545

546546
NormAnalyzerProperties properties = new NormAnalyzerProperties();
547-
properties.setLocale("ru.utf-8");
547+
properties.setLocale("ru");
548548
properties.setAnalyzerCase(SearchAnalyzerCase.lower);
549549
properties.setAccent(true);
550550

@@ -673,7 +673,7 @@ public void textAnalyzer() {
673673
features.add(AnalyzerFeature.position);
674674

675675
Map<String, Object> properties = new HashMap<>();
676-
properties.put("locale", "ru.utf-8");
676+
properties.put("locale", "ru");
677677
properties.put("case", "lower");
678678
properties.put("stopwords", Collections.emptyList());
679679
properties.put("accent", true);
@@ -700,7 +700,7 @@ public void textAnalyzerTyped() {
700700
features.add(AnalyzerFeature.position);
701701

702702
TextAnalyzerProperties properties = new TextAnalyzerProperties();
703-
properties.setLocale("ru.utf-8");
703+
properties.setLocale("ru");
704704
properties.setAnalyzerCase(SearchAnalyzerCase.lower);
705705
properties.setAccent(true);
706706
properties.setStemming(true);
@@ -731,7 +731,7 @@ public void enhancedTextAnalyzer() {
731731
edgeNgram.put("preserveOriginal", true);
732732

733733
Map<String, Object> properties = new HashMap<>();
734-
properties.put("locale", "ru.utf-8");
734+
properties.put("locale", "ru");
735735
properties.put("case", "lower");
736736
properties.put("stopwords", Collections.emptyList());
737737
properties.put("accent", true);
@@ -764,7 +764,7 @@ public void enhancedTextAnalyzerTyped() {
764764
edgeNgram.setPreserveOriginal(true);
765765

766766
TextAnalyzerProperties properties = new TextAnalyzerProperties();
767-
properties.setLocale("ru.utf-8");
767+
properties.setLocale("ru");
768768
properties.setAnalyzerCase(SearchAnalyzerCase.lower);
769769
properties.setAccent(true);
770770
properties.setStemming(true);
@@ -833,7 +833,7 @@ public void pipelineAnalyzer() {
833833

834834
// stem
835835
StemAnalyzerProperties stemAnalyzerProperties = new StemAnalyzerProperties();
836-
stemAnalyzerProperties.setLocale("en.utf-8");
836+
stemAnalyzerProperties.setLocale("en");
837837

838838
StemAnalyzer stemAnalyzer = new StemAnalyzer();
839839
stemAnalyzer.setProperties(stemAnalyzerProperties);

src/test/java/com/arangodb/async/ArangoSearchTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ public void stemAnalyzer() throws ExecutionException, InterruptedException {
413413
options.setFeatures(features);
414414
options.setName(name);
415415
options.setType(AnalyzerType.stem);
416-
options.setProperties(Collections.singletonMap("locale", "ru.utf-8"));
416+
options.setProperties(Collections.singletonMap("locale", "ru"));
417417

418418
createGetAndDeleteAnalyzer(options);
419419
}
@@ -430,7 +430,7 @@ public void stemAnalyzerTyped() throws ExecutionException, InterruptedException
430430
features.add(AnalyzerFeature.position);
431431

432432
StemAnalyzerProperties properties = new StemAnalyzerProperties();
433-
properties.setLocale("ru.utf-8");
433+
properties.setLocale("ru");
434434

435435
StemAnalyzer options = new StemAnalyzer();
436436
options.setFeatures(features);
@@ -451,7 +451,7 @@ public void normAnalyzer() throws ExecutionException, InterruptedException {
451451
features.add(AnalyzerFeature.position);
452452

453453
Map<String, Object> properties = new HashMap<>();
454-
properties.put("locale", "ru.utf-8");
454+
properties.put("locale", "ru");
455455
properties.put("case", "lower");
456456
properties.put("accent", true);
457457

@@ -476,7 +476,7 @@ public void normAnalyzerTyped() throws ExecutionException, InterruptedException
476476
features.add(AnalyzerFeature.position);
477477

478478
NormAnalyzerProperties properties = new NormAnalyzerProperties();
479-
properties.setLocale("ru.utf-8");
479+
properties.setLocale("ru");
480480
properties.setAnalyzerCase(SearchAnalyzerCase.lower);
481481
properties.setAccent(true);
482482

@@ -550,7 +550,7 @@ public void textAnalyzer() throws ExecutionException, InterruptedException {
550550
features.add(AnalyzerFeature.position);
551551

552552
Map<String, Object> properties = new HashMap<>();
553-
properties.put("locale", "ru.utf-8");
553+
properties.put("locale", "ru");
554554
properties.put("case", "lower");
555555
properties.put("stopwords", Collections.emptyList());
556556
properties.put("accent", true);
@@ -577,7 +577,7 @@ public void textAnalyzerTyped() throws ExecutionException, InterruptedException
577577
features.add(AnalyzerFeature.position);
578578

579579
TextAnalyzerProperties properties = new TextAnalyzerProperties();
580-
properties.setLocale("ru.utf-8");
580+
properties.setLocale("ru");
581581
properties.setAnalyzerCase(SearchAnalyzerCase.lower);
582582
properties.setAccent(true);
583583
properties.setStemming(true);

0 commit comments

Comments
 (0)