Skip to content

Commit 1f2b18c

Browse files
committed
Update to Elasticsearch 8.3.0
1 parent ee93f48 commit 1f2b18c

File tree

6 files changed

+10
-8
lines changed

6 files changed

+10
-8
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM docker.elastic.co/elasticsearch/elasticsearch:8.2.3
1+
FROM docker.elastic.co/elasticsearch/elasticsearch:8.3.0
22

33
ADD ./src/test/resources/models/en-ner-persons.bin /usr/share/elasticsearch/config/ingest-opennlp/
44
ADD ./src/test/resources/models/en-ner-locations.bin /usr/share/elasticsearch/config/ingest-opennlp/

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ This plugin is also intended to show you, that using gradle as a build system ma
1010

1111
| ES | Command |
1212
| ----- | ------- |
13+
| 8.3.0 | `bin/elasticsearch-plugin install https://github.com/spinscale/elasticsearch-ingest-opennlp/releases/download/8.3.0.1/ingest-opennlp-8.3.0.1.zip` |
1314
| 8.2.3 | `bin/elasticsearch-plugin install https://github.com/spinscale/elasticsearch-ingest-opennlp/releases/download/8.2.3.1/ingest-opennlp-8.2.3.1.zip` |
1415
| 8.2.2 | `bin/elasticsearch-plugin install https://github.com/spinscale/elasticsearch-ingest-opennlp/releases/download/8.2.2.1/ingest-opennlp-8.2.2.1.zip` |
1516
| 8.2.1 | `bin/elasticsearch-plugin install https://github.com/spinscale/elasticsearch-ingest-opennlp/releases/download/8.2.1.1/ingest-opennlp-8.2.0.1.zip` |

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ dependencies {
118118
compileOnly "org.elasticsearch:elasticsearch:$elasticsearchVersion"
119119

120120
testImplementation "org.elasticsearch:elasticsearch:$elasticsearchVersion"
121-
testImplementation 'co.elastic.clients:elasticsearch-java:8.2.0'
121+
testImplementation "co.elastic.clients:elasticsearch-java:$elasticsearchVersion"
122122
testImplementation 'com.fasterxml.jackson.core:jackson-databind:2.12.3'
123123
testImplementation('org.testcontainers:elasticsearch:1.17.1') {
124124
exclude group: 'junit', module: 'junit'

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
elasticsearchVersion = 8.2.3
1+
elasticsearchVersion = 8.3.0

src/main/java/de/spinscale/elasticsearch/ingest/opennlp/OpenNlpModelDownloader.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@
1818
package de.spinscale.elasticsearch.ingest.opennlp;
1919

2020
import joptsimple.OptionSet;
21-
import org.elasticsearch.common.cli.EnvironmentAwareCommand;
22-
import org.elasticsearch.cli.SuppressForbidden;
21+
import org.elasticsearch.cli.ProcessInfo;
2322
import org.elasticsearch.cli.Terminal;
23+
import org.elasticsearch.common.cli.EnvironmentAwareCommand;
24+
import org.elasticsearch.core.SuppressForbidden;
2425
import org.elasticsearch.env.Environment;
2526

2627
import java.io.InputStream;
@@ -32,15 +33,15 @@
3233
public class OpenNlpModelDownloader extends EnvironmentAwareCommand {
3334

3435
public static void main(String[] args) throws Exception {
35-
exit(new OpenNlpModelDownloader().main(args, Terminal.DEFAULT));
36+
exit(new OpenNlpModelDownloader().main(args, Terminal.DEFAULT, ProcessInfo.fromSystem()));
3637
}
3738

3839
public OpenNlpModelDownloader() {
3940
super("Downloads three sample models for named entity recognition for dates, locations and persons");
4041
}
4142

4243
@Override
43-
protected void execute(Terminal terminal, OptionSet options, Environment env) throws Exception {
44+
public void execute(Terminal terminal, OptionSet options, Environment env, ProcessInfo processInfo) throws Exception {
4445
Path configDirectoryPath = env.configFile().resolve(IngestOpenNlpPlugin.NAME).normalize().toAbsolutePath();
4546
if (Files.exists(configDirectoryPath) == false) {
4647
Files.createDirectories(configDirectoryPath);

src/test/java/de/spinscale/elasticsearch/ingest/opennlp/OpenNlpPluginIntegrationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public static void startContainer() {
4848
container.addEnv("discovery.type", "single-node");
4949
container.withEnv("xpack.security.enabled", "false");
5050
container.addExposedPorts(9200);
51-
container.setWaitStrategy(new LogMessageWaitStrategy().withRegEx(".*(\"message\":\\s?\"started\".*|] started\n$)"));
51+
container.setWaitStrategy(new LogMessageWaitStrategy().withRegEx(".*(\"message\":\\s?\"started[\\s?|\"].*|] started\n$)"));
5252

5353
container.start();
5454
container.followOutput(new Slf4jLogConsumer(LoggerFactory.getLogger(OpenNlpPluginIntegrationTests.class)));

0 commit comments

Comments
 (0)