From ffd617aa25b625e6726a815973ef76de34a3b7c8 Mon Sep 17 00:00:00 2001 From: Alex Klibisz Date: Wed, 25 Aug 2021 20:34:12 -0400 Subject: [PATCH] Dependencies: Upgrade Elasticsearch to 7.14.0, Lucene to 8.9.0 (#304) --- build.gradle | 4 +-- client-python/requirements.txt | 2 +- docs/pages/installation.md | 2 +- elastiknn-plugin/Dockerfile | 2 +- .../klibisz/elastiknn/ElastiknnPlugin.scala | 1 - .../elastiknn/mapper/VectorMapper.scala | 3 +-- .../elastiknn/ElastiKnnJavaClusterIT.java | 27 ------------------- .../klibisz/elastiknn/ElastiKnnRestIT.java | 19 ------------- version | 2 +- 9 files changed, 7 insertions(+), 55 deletions(-) delete mode 100644 elastiknn-plugin/src/test/java/com/klibisz/elastiknn/ElastiKnnJavaClusterIT.java delete mode 100644 elastiknn-plugin/src/test/java/com/klibisz/elastiknn/ElastiKnnRestIT.java diff --git a/build.gradle b/build.gradle index 315491fc2..7f2b5e426 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ buildscript { ext { - esVersion = '7.13.3' - luceneVersion = '8.8.2' + esVersion = '7.14.0' + luceneVersion = '8.9.0' circeVersion= '0.14.0-M4' circeGenericExtrasVersion= '0.13.1-M4' scalaShortVersion = '2.12' diff --git a/client-python/requirements.txt b/client-python/requirements.txt index 61ba0bf16..1a5883d1b 100644 --- a/client-python/requirements.txt +++ b/client-python/requirements.txt @@ -1,4 +1,4 @@ -elasticsearch==7.13.3 +elasticsearch==7.14.0 dataclasses-json==0.3.7 tqdm==4.61.1 scipy==1.7.0 diff --git a/docs/pages/installation.md b/docs/pages/installation.md index 099f6c231..3fca19363 100644 --- a/docs/pages/installation.md +++ b/docs/pages/installation.md @@ -31,7 +31,7 @@ Make a Dockerfile like below. The image version (`elasticsearch:A.B.C`) must mat ```docker FROM docker.elastic.co/elasticsearch/elasticsearch:7.13.3 -RUN elasticsearch-plugin install --batch https://github.com/alexklibisz/elastiknn/releases/download/7.13.3.2/elastiknn-7.13.3.2.zip +RUN elasticsearch-plugin install --batch https://github.com/alexklibisz/elastiknn/releases/download/7.14.0.0/elastiknn-7.14.0.0.zip ``` Build and run the Dockerfile. If you have any issues please refer to the [official docs.](https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html) diff --git a/elastiknn-plugin/Dockerfile b/elastiknn-plugin/Dockerfile index 7ad99343e..73484e431 100644 --- a/elastiknn-plugin/Dockerfile +++ b/elastiknn-plugin/Dockerfile @@ -1,3 +1,3 @@ -FROM docker.elastic.co/elasticsearch/elasticsearch:7.13.3-amd64 +FROM docker.elastic.co/elasticsearch/elasticsearch:7.14.0-amd64 COPY build/distributions/*.zip . RUN elasticsearch-plugin install -b file:$(ls elastiknn*zip | sort | tail -n1) diff --git a/elastiknn-plugin/src/main/scala/com/klibisz/elastiknn/ElastiknnPlugin.scala b/elastiknn-plugin/src/main/scala/com/klibisz/elastiknn/ElastiknnPlugin.scala index 3b14d5886..d8c41d998 100644 --- a/elastiknn-plugin/src/main/scala/com/klibisz/elastiknn/ElastiknnPlugin.scala +++ b/elastiknn-plugin/src/main/scala/com/klibisz/elastiknn/ElastiknnPlugin.scala @@ -63,7 +63,6 @@ class ElastiknnPlugin(settings: Settings) extends Plugin with SearchPlugin with config.getGlobalCheckpointSupplier, config.retentionLeasesSupplier, config.getPrimaryTermSupplier, - config.getTombstoneDocSupplier, config.getSnapshotCommitSupplier ) ) diff --git a/elastiknn-plugin/src/main/scala/com/klibisz/elastiknn/mapper/VectorMapper.scala b/elastiknn-plugin/src/main/scala/com/klibisz/elastiknn/mapper/VectorMapper.scala index bf2972fad..601d42273 100644 --- a/elastiknn-plugin/src/main/scala/com/klibisz/elastiknn/mapper/VectorMapper.scala +++ b/elastiknn-plugin/src/main/scala/com/klibisz/elastiknn/mapper/VectorMapper.scala @@ -14,7 +14,6 @@ import org.apache.lucene.search.{Query, TermQuery} import org.apache.lucene.util.BytesRef import org.elasticsearch.common.xcontent.XContentParser.Token import org.elasticsearch.common.xcontent.{ToXContent, XContentBuilder} -import org.elasticsearch.index.mapper.Mapper.TypeParser import org.elasticsearch.index.mapper._ import org.elasticsearch.index.query.SearchExecutionContext import org.elasticsearch.search.lookup.SourceLookup @@ -103,7 +102,7 @@ abstract class VectorMapper[V <: Vec: ElasticsearchCodec] { self => import com.klibisz.elastiknn.utils.CirceUtils._ class TypeParser extends Mapper.TypeParser { - override def parse(name: String, node: JavaJsonMap, parserContext: TypeParser.ParserContext): Mapper.Builder = { + override def parse(name: String, node: JavaJsonMap, parserContext: MappingParserContext): Mapper.Builder = { val mapping: Mapping = ElasticsearchCodec.decodeJsonGet[Mapping](node.asJson) val builder: Builder = new Builder(name, mapping) // TypeParsers.parseField(builder, name, node, parserContext) diff --git a/elastiknn-plugin/src/test/java/com/klibisz/elastiknn/ElastiKnnJavaClusterIT.java b/elastiknn-plugin/src/test/java/com/klibisz/elastiknn/ElastiKnnJavaClusterIT.java deleted file mode 100644 index 6bda0995e..000000000 --- a/elastiknn-plugin/src/test/java/com/klibisz/elastiknn/ElastiKnnJavaClusterIT.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.klibisz.elastiknn; - -import org.apache.http.HttpHost; -import org.elasticsearch.test.ESIntegTestCase; -import org.junit.Before; - - -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.SUITE, numClientNodes = 1) -public class ElastiKnnJavaClusterIT extends ESIntegTestCase { - - @Before - public void setup() { - ensureGreen(); - } - - public void testDummy() { - assertTrue(true); - } - - public void testPluginInstalled() { - this.ensureGreen(); - HttpHost host = ESIntegTestCase.getRestClient().getNodes().get(0).getHost(); - assertTrue(true); - } - -} - diff --git a/elastiknn-plugin/src/test/java/com/klibisz/elastiknn/ElastiKnnRestIT.java b/elastiknn-plugin/src/test/java/com/klibisz/elastiknn/ElastiKnnRestIT.java deleted file mode 100644 index dc009a758..000000000 --- a/elastiknn-plugin/src/test/java/com/klibisz/elastiknn/ElastiKnnRestIT.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.klibisz.elastiknn; - -import com.carrotsearch.randomizedtesting.annotations.Name; -import com.carrotsearch.randomizedtesting.annotations.ParametersFactory; -import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate; -import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase; - -public class ElastiKnnRestIT extends ESClientYamlSuiteTestCase { - - public ElastiKnnRestIT(@Name("yaml")ClientYamlTestCandidate testCandidate) { - super(testCandidate); - } - - @ParametersFactory - public static Iterable parameters() throws Exception { - return ESClientYamlSuiteTestCase.createParameters(); - } - -} diff --git a/version b/version index 1f7bca8c7..e511e21ad 100644 --- a/version +++ b/version @@ -1 +1 @@ -7.13.3.2 \ No newline at end of file +7.14.0.0 \ No newline at end of file