Skip to content

Commit eeeb144

Browse files
committed
Support Es 8.16 to 8.18
1 parent cdbdc91 commit eeeb144

File tree

17 files changed

+264
-43
lines changed

17 files changed

+264
-43
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,15 @@ jobs:
1414
strategy:
1515
matrix:
1616
es-version:
17+
- 'es:8.18.3'
18+
- 'es:8.17.8'
19+
- 'es:8.16.6'
1720
- 'es:8.15.2'
1821
- 'es:8.14.3'
1922
- 'es:8.13.4'
2023
- 'es:8.12.2'
2124
- 'es:8.11.4'
2225
- 'es:8.10.4'
23-
- 'es:8.9.2'
24-
- 'es:8.8.2'
25-
- 'es:8.7.1'
26-
- 'es:8.6.2'
27-
- 'es:8.5.3'
28-
- 'es:8.4.3'
29-
- 'es:8.3.3'
30-
- 'es:8.2.3'
31-
- 'es:7.17.24'
32-
- 'es:7.17.8'
33-
- 'es:7.14.2'
34-
- 'es:7.10.2'
3526
- 'os:2.18.0'
3627
- 'os:2.17.1'
3728
- 'os:2.16.0'

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
# Change log
22

3-
## [Unreleased]
3+
## [3.4.0](https://github.com/WorksApplications/elasticsearch-sudachi/releases/tag/v3.4.0) - 2025-08-18
44

55
### Added
66

77
- Support OpenSearch 2.18.0
8+
- Support Elasticsearch 8.16.6, 8.17.8, and 8.18.3
9+
10+
### Removed
11+
- Elasticsearch 7.x and versions earlier than 8.10 will no longer be supported.$
812

913
## [3.3.0](https://github.com/WorksApplications/elasticsearch-sudachi/releases/tag/v3.3.0) - 2024-11-13
1014

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,24 @@ analysis-sudachi is an Elasticsearch plugin for tokenization of Japanese text us
77

88
# What's new?
99

10-
- [3.3.0]
11-
- `allow_empty_morpheme` is added to the `sudachi_tokenizer` settings (#151)
12-
- Offset correction of `SudachiSplitFilter` now works properly with char filters (#149)
13-
- spi changed to implement #149
10+
- [3.4.0]
11+
- Support Elasticsearch 8.16.6, 8.17.8, and 8.18.3.
12+
- Elasticsearch 7.x and versions earlier than 8.10 will no longer be supported.
1413

1514
Check [changelog](./CHANGELOG.md) for more.
1615

1716
# Build (if necessary)
1817

1918
1. Build analysis-sudachi.
2019
```
21-
$ ./gradlew -PengineVersion=es:8.15.2 build
20+
$ ./gradlew -PengineVersion=es:8.19.2 build
2221
```
2322

2423
Use `-PengineVersion=os:2.18.0` for OpenSearch.
2524

2625
## Supported ElasticSearch versions
2726

28-
1. 8.10.* until 8.15.* supported, integration tests in CI
27+
1. 8.10.* until 8.19.* supported, integration tests in CI
2928

3029
## Supported OpenSearch versions
3130

buildSrc/src/main/groovy/com/worksap/nlp/tools/engines.groovy

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ trait EngineSupport {
77
enum EsSupport implements EngineSupport {
88
Es810("es-8.10"),
99
Es812("es-8.12"),
10+
Es816("es-8.16"),
11+
Es818("es-8.18"),
1012

1113
String tag
1214
List<String> keys
@@ -21,8 +23,12 @@ enum EsSupport implements EngineSupport {
2123
throw new IllegalArgumentException("versions below 8.10 are not supported")
2224
} else if (vers.ge(8, 10) && vers.lt(8, 12)) {
2325
return Es810
24-
} else if (vers.ge(8, 12) && vers.lt(9, 0)) {
26+
} else if (vers.ge(8, 12) && vers.lt(8, 16)) {
2527
return Es812
28+
} else if (vers.ge(8, 16) && vers.lt(8, 18)) {
29+
return Es816
30+
} else if (vers.ge(8, 18) && vers.lt(9, 0)) {
31+
return Es818
2632
} else {
2733
throw new IllegalArgumentException("unsupported ElasticSearch version: " + vers.raw)
2834
}

gradle.properties

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
# elasticsearch versions: 8.15.2, 8.14.3, 8.13.4, 8.12.2, 8.11.4, 8.10.4
1+
# elasticsearch versions: 8.18.3, 8.17.8, 8.16.6, 8.15.2, 8.14.3, 8.13.4, 8.12.2,
2+
# 8.11.4, 8.10.4
23
# opensearch version: 2.18.0, 2.17.1, 2.16.0, 2.15.0, 2.14.0, 2.13.0, 2.12.0, 2.11.1,
34
# 2.10.0, 2.9.0, 2.8.0, 2.7.0, 2.6.0
4-
engineVersion=es:8.15.2
5+
engineVersion=es:8.19.2
56
org.gradle.jvmargs=-XX:MaxMetaspaceSize=350m \
67
--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
78
--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \

integration/src/test/ext/es-8.12-ge/SudachiInSearchEngineEnv.kt renamed to integration/src/test/ext/es-8.12/SudachiInSearchEngineEnv.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2024 Works Applications Co., Ltd.
2+
* Copyright (c) 2024-2025 Works Applications Co., Ltd.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
* Copyright (c) 2024-2025 Works Applications Co., Ltd.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.worksap.nlp.elasticsearch.sudachi
18+
19+
import org.elasticsearch.indices.analysis.AnalysisModule
20+
import org.elasticsearch.plugins.AnalysisPlugin
21+
import org.elasticsearch.plugins.PluginsService
22+
23+
typealias PluginsServiceAlias = PluginsService
24+
25+
fun SudachiInSearchEngineEnv.makePluginService(): PluginsServiceAlias {
26+
return PluginsService(settings(), configPath, null, pluginsPath)
27+
}
28+
29+
fun SudachiInSearchEngineEnv.makeAnalysisModule(): AnalysisModule {
30+
val plugins = makePluginService()
31+
val analysisPlugins = plugins.filterPlugins(AnalysisPlugin::class.java).toList()
32+
val env = environment()
33+
return AnalysisModule(env, analysisPlugins, plugins.stablePluginRegistry)
34+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
* Copyright (c) 2024-2025 Works Applications Co., Ltd.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.worksap.nlp.elasticsearch.sudachi
18+
19+
import org.elasticsearch.indices.analysis.AnalysisModule
20+
import org.elasticsearch.plugins.AnalysisPlugin
21+
import org.elasticsearch.plugins.PluginsLoader
22+
import org.elasticsearch.plugins.PluginsService
23+
24+
typealias PluginsServiceAlias = PluginsService
25+
26+
fun SudachiInSearchEngineEnv.makePluginService(): PluginsServiceAlias {
27+
return PluginsService(
28+
settings(),
29+
configPath,
30+
PluginsLoader.createPluginsLoader(
31+
null, PluginsLoader.loadPluginsBundles(pluginsPath), null, false))
32+
}
33+
34+
fun SudachiInSearchEngineEnv.makeAnalysisModule(): AnalysisModule {
35+
val plugins = makePluginService()
36+
val analysisPlugins = plugins.filterPlugins(AnalysisPlugin::class.java).toList()
37+
val env = environment()
38+
return AnalysisModule(env, analysisPlugins, plugins.stablePluginRegistry)
39+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* Copyright (c) 2025 Works Applications Co., Ltd.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.worksap.nlp.elasticsearch.sudachi
18+
19+
import com.worksap.nlp.search.aliases.Environment
20+
import com.worksap.nlp.search.aliases.Settings
21+
import java.nio.file.Path
22+
23+
fun resourcesPath(env: Environment, settings: Settings): Path {
24+
return env.configFile()
25+
.resolve(
26+
settings.get(ConfigAdapter.PARAM_RESOURCES_PATH, ConfigAdapter.DEFAULT_RESOURCE_PATH))
27+
}

src/main/ext/es-8.18/ConfigAdapter.kt

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* Copyright (c) 2025 Works Applications Co., Ltd.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.worksap.nlp.elasticsearch.sudachi
18+
19+
import com.worksap.nlp.search.aliases.Environment
20+
import com.worksap.nlp.search.aliases.Settings
21+
import java.nio.file.Path
22+
23+
fun resourcesPath(env: Environment, settings: Settings): Path {
24+
return env.configDir()
25+
.resolve(
26+
settings.get(ConfigAdapter.PARAM_RESOURCES_PATH, ConfigAdapter.DEFAULT_RESOURCE_PATH))
27+
}

0 commit comments

Comments
 (0)