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

Commit b56a99f

Browse files
committed
Update to 7.9.0
1 parent a532b2f commit b56a99f

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

README.md

Lines changed: 2 additions & 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+
| 7.9.0 | `bin/elasticsearch-plugin install https://github.com/spinscale/elasticsearch-ingest-langdetect/releases/download/7.9.0.1/ingest-langdetect-7.9.0.1.zip` |
1314
| 7.8.1 | `bin/elasticsearch-plugin install https://github.com/spinscale/elasticsearch-ingest-langdetect/releases/download/7.8.1.1/ingest-langdetect-7.8.1.1.zip` |
1415
| 7.8.0 | `bin/elasticsearch-plugin install https://github.com/spinscale/elasticsearch-ingest-langdetect/releases/download/7.8.0.1/ingest-langdetect-7.8.0.1.zip` |
1516
| 7.7.1 | `bin/elasticsearch-plugin install https://github.com/spinscale/elasticsearch-ingest-langdetect/releases/download/7.7.1.1/ingest-langdetect-7.7.1.1.zip` |
@@ -32,6 +33,7 @@ Note that Elasticsearch has native support for langdetection nowadays using the
3233
| 7.1.0 | `bin/elasticsearch-plugin install https://github.com/spinscale/elasticsearch-ingest-langdetect/releases/download/7.1.0.1/ingest-langdetect-7.1.0.1.zip` |
3334
| 7.0.1 | `bin/elasticsearch-plugin install https://github.com/spinscale/elasticsearch-ingest-langdetect/releases/download/7.0.1.1/ingest-langdetect-7.0.1.1.zip` |
3435
| 7.0.0 | `bin/elasticsearch-plugin install https://github.com/spinscale/elasticsearch-ingest-langdetect/releases/download/7.0.0.1/ingest-langdetect-7.0.0.1.zip` |
36+
| 6.8.12 | `bin/elasticsearch-plugin install https://github.com/spinscale/elasticsearch-ingest-langdetect/releases/download/6.8.12.1/ingest-langdetect-6.8.12.1.zip` |
3537
| 6.8.11 | `bin/elasticsearch-plugin install https://github.com/spinscale/elasticsearch-ingest-langdetect/releases/download/6.8.11.1/ingest-langdetect-6.8.11.1.zip` |
3638
| 6.8.10 | `bin/elasticsearch-plugin install https://github.com/spinscale/elasticsearch-ingest-langdetect/releases/download/6.8.10.1/ingest-langdetect-6.8.10.1.zip` |
3739
| 6.8.9 | `bin/elasticsearch-plugin install https://github.com/spinscale/elasticsearch-ingest-langdetect/releases/download/6.8.9.1/ingest-langdetect-6.8.9.1.zip` |

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
elasticsearchVersion = 7.8.1
1+
elasticsearchVersion = 7.9.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public class LangDetectProcessor extends AbstractProcessor {
4444

4545
public LangDetectProcessor(String tag, String field, String targetField, ByteSizeValue maxLength, boolean ignoreMissing)
4646
throws IOException {
47-
super(tag);
47+
super(tag, "Ingest processor doing language detection for fields");
4848
this.field = field;
4949
this.targetField = targetField;
5050
this.maxLength = maxLength;
@@ -87,8 +87,8 @@ public static final class Factory implements Processor.Factory {
8787
private static final ByteSizeValue DEFAULT_MAX_LENGTH = new ByteSizeValue(10, ByteSizeUnit.KB);
8888

8989
@Override
90-
public LangDetectProcessor create(Map<String, Processor.Factory> factories, String tag, Map<String, Object> config)
91-
throws Exception {
90+
public Processor create(Map<String, Processor.Factory> processorFactories, String tag, String description,
91+
Map<String, Object> config) throws Exception {
9292
String field = readStringProperty(TYPE, tag, config, "field");
9393
String targetField = readStringProperty(TYPE, tag, config, "target_field");
9494
String maxLengthStr = readOptionalStringProperty(TYPE, tag, config, "max_length");

src/test/java/org/elasticsearch/plugin/ingest/langdetect/LangDetectProcessorTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import org.elasticsearch.common.settings.Settings;
2323
import org.elasticsearch.env.Environment;
2424
import org.elasticsearch.ingest.IngestDocument;
25+
import org.elasticsearch.ingest.Processor;
2526
import org.elasticsearch.ingest.RandomDocumentPicks;
2627
import org.elasticsearch.test.ESTestCase;
2728
import org.junit.BeforeClass;
@@ -94,7 +95,7 @@ private Map<String, Object> ingestDocument(Map<String, Object> config, String fi
9495
document.put(field, value);
9596
IngestDocument ingestDocument = RandomDocumentPicks.randomIngestDocument(random(), document);
9697

97-
LangDetectProcessor processor = new LangDetectProcessor.Factory().create(Collections.emptyMap(), randomAlphaOfLength(10), config);
98+
Processor processor = new LangDetectProcessor.Factory().create(Collections.emptyMap(), randomAlphaOfLength(10), "desc", config);
9899
return processor.execute(ingestDocument).getSourceAndMetadata();
99100
}
100101

0 commit comments

Comments
 (0)