Skip to content

Commit a13b943

Browse files
committed
Fix name collision
1 parent 3bd8fad commit a13b943

File tree

5 files changed

+30
-18
lines changed

5 files changed

+30
-18
lines changed

README.md

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,37 @@ in the [release](https://github.com/monitora-media/es-utils/releases/latest).
2525
Analysis filter that converts to lowercase but keeps the originally-cased token in the stream as
2626
well.
2727

28-
Index settings:
28+
### Czech and Slovak stemmers
29+
30+
Specialized stemmers
31+
32+
### Example index settings
2933

3034
```json
3135
{
32-
"analysis": {
3336
"filter": {
34-
"lowercase": {
35-
"type": "monitora_lowercase",
36-
"preserve_original": "true"
37-
},
38-
"analyzer": {
37+
"lowercase": {
38+
"type": "monitora_lowercase",
39+
"preserve_original": "true"
40+
},
41+
"mczech_stem": {
42+
"type": "monitora_czech_stem",
43+
"with_asciifold": "true"
44+
},
45+
"mslovak_stem": {
46+
"type": "monitora_slovak_stem",
47+
"with_asciifold": "true"
48+
}
49+
},
50+
"analyzer": {
3951
"index": {
40-
"type": "custom",
41-
"filter": [
42-
"lowercase"
43-
]
52+
"type": "custom",
53+
"tokenizer": "whitespace",
54+
"filter": [
55+
"lowercase",
56+
"mczech_stem"
57+
]
4458
}
45-
}
4659
}
47-
}
4860
}
4961
```

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
elasticsearch.version=8.5.3
2-
plugin.version=1.0.0-SNAPSHOT
2+
plugin.version=1.2.0-SNAPSHOT

src/main/java/cz/monitora/elasticsearch/MonitoraESPlugin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ public class MonitoraESPlugin extends Plugin implements AnalysisPlugin {
1717
public Map<String, AnalysisModule.AnalysisProvider<TokenFilterFactory>> getTokenFilters() {
1818
Map<String, AnalysisModule.AnalysisProvider<TokenFilterFactory>> extra = new HashMap<>();
1919
extra.put("monitora_lowercase", AnalysisPlugin.requiresAnalysisSettings(LowerCaseTokenFilterFactory::new));
20-
extra.put("czech_stem", CzechStemFilterFactory::new);
21-
extra.put("slovak_stem", SlovakStemFilterFactory::new);
20+
extra.put("monitora_czech_stem", CzechStemFilterFactory::new);
21+
extra.put("monitora_slovak_stem", SlovakStemFilterFactory::new);
2222
return extra;
2323
}
2424
}

src/main/java/cz/monitora/elasticsearch/analyzer/czech/CzechStemFilterFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class CzechStemFilterFactory extends AbstractTokenFilterFactory {
1515
/** Creates a new CzechStemFilterFactory */
1616
public CzechStemFilterFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) {
1717
super(name, settings);
18-
withASCIIFold = settings.getAsBoolean("with_asciifold", true);
18+
withASCIIFold = settings.getAsBoolean("with_asciifold", false);
1919
}
2020

2121
@Override

src/main/java/cz/monitora/elasticsearch/analyzer/slovak/SlovakStemFilterFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class SlovakStemFilterFactory extends AbstractTokenFilterFactory {
1414

1515
public SlovakStemFilterFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) {
1616
super(name, settings);
17-
withASCIIFold = settings.getAsBoolean("with_asciifold", true);
17+
withASCIIFold = settings.getAsBoolean("with_asciifold", false);
1818
}
1919

2020
@Override

0 commit comments

Comments
 (0)