Skip to content
This repository was archived by the owner on Oct 29, 2023. It is now read-only.

Commit 78f0ec2

Browse files
committed
Update to Elasticsearch 8.0.0-beta1
1 parent 461b8dc commit 78f0ec2

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Note that Elasticsearch has native support for langdetection nowadays using the
1010

1111
| ES | Command |
1212
| ----- | ------- |
13+
| 8.0.0-beta1 | `bin/elasticsearch-plugin install https://github.com/spinscale/elasticsearch-ingest-langdetect/releases/download/8.0.0-beta1.1/ingest-langdetect-8.0.0-beta1.1.zip` |
1314
| 8.0.0-alpha2 | `bin/elasticsearch-plugin install https://github.com/spinscale/elasticsearch-ingest-langdetect/releases/download/8.0.0-alpha2.1/ingest-langdetect-8.0.0-alpha2.1.zip` |
1415
| 7.16.1 | `bin/elasticsearch-plugin install https://github.com/spinscale/elasticsearch-ingest-langdetect/releases/download/7.16.1.1/ingest-langdetect-7.16.1.1.zip` |
1516
| 7.16.0 | `bin/elasticsearch-plugin install https://github.com/spinscale/elasticsearch-ingest-langdetect/releases/download/7.16.0.1/ingest-langdetect-7.16.0.1.zip` |

build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ plugins {
2323

2424
repositories {
2525
mavenCentral()
26+
// only needed for beta1, can be removed after upgrading to newer version
27+
maven {
28+
url = 'https://s3.amazonaws.com/download.elasticsearch.org/lucenesnapshots/cc2a31f2be8'
29+
}
2630
}
2731

2832
group = 'de.spinscale.elasticsearch.plugin'

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
elasticsearchVersion = 8.0.0-alpha2
1+
elasticsearchVersion = 8.0.0-beta1

src/main/java/com/cybozu/labs/langdetect/SecureDetectorFactory.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919

2020
import com.cybozu.labs.langdetect.util.LangProfile;
2121
import org.elasticsearch.common.io.FileSystemUtils;
22-
import org.elasticsearch.common.xcontent.DeprecationHandler;
23-
import org.elasticsearch.common.xcontent.NamedXContentRegistry;
24-
import org.elasticsearch.common.xcontent.XContentType;
22+
import org.elasticsearch.xcontent.DeprecationHandler;
23+
import org.elasticsearch.xcontent.NamedXContentRegistry;
24+
import org.elasticsearch.xcontent.XContentType;
2525
import org.elasticsearch.env.Environment;
2626

2727
import java.io.IOException;

src/main/java/org/elasticsearch/plugin/ingest/langdetect/LangDetectProcessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public LangDetectProcessor(String tag, String description, String field, String
5555
@Override
5656
public IngestDocument execute(IngestDocument ingestDocument) throws Exception {
5757
Detector detector = DetectorFactory.create();
58-
detector.setMaxTextLength(maxLength.bytesAsInt());
58+
detector.setMaxTextLength(Long.valueOf(maxLength.getBytes()).intValue());
5959

6060
String content;
6161
try {

0 commit comments

Comments
 (0)