diff --git a/build.sbt b/build.sbt index 2f70d66dc..658908be3 100644 --- a/build.sbt +++ b/build.sbt @@ -6,7 +6,7 @@ Global / scalaVersion := "3.3.3" Global / scalacOptions += "-explain" lazy val CirceVersion = "0.14.9" -lazy val ElasticsearchVersion = "8.14.3" +lazy val ElasticsearchVersion = "8.15.0" lazy val Elastic4sVersion = "8.14.1" lazy val ElastiknnVersion = IO.read(file("version")).strip() lazy val LuceneVersion = "9.10.0" diff --git a/docker/Dockerfile b/docker/Dockerfile index 36a5bbe76..cb0b4444d 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,3 +1,3 @@ -FROM docker.elastic.co/elasticsearch/elasticsearch:8.14.3 +FROM docker.elastic.co/elasticsearch/elasticsearch:8.15.0 COPY elastiknn-plugin/target/elastiknn*.zip . RUN elasticsearch-plugin install -b file:$(ls elastiknn*zip | sort | tail -n1) diff --git a/docs/pages/installation.md b/docs/pages/installation.md index 209f6a406..5b5455c57 100644 --- a/docs/pages/installation.md +++ b/docs/pages/installation.md @@ -42,8 +42,8 @@ Make a Dockerfile like below. The image version (`elasticsearch:A.B.C`) must match the plugin's version (e.g. `A.B.C.x/elastiknn-A.B.C.x`). ```docker -FROM docker.elastic.co/elasticsearch/elasticsearch:8.14.3 -RUN elasticsearch-plugin install --batch https://github.com/alexklibisz/elastiknn/releases/download/8.14.3.0/elastiknn-8.14.3.0.zip +FROM docker.elastic.co/elasticsearch/elasticsearch:8.15.0 +RUN elasticsearch-plugin install --batch https://github.com/alexklibisz/elastiknn/releases/download/8.15.0.0/elastiknn-8.15.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/src/main/scala/com/klibisz/elastiknn/mapper/VectorMapper.scala b/elastiknn-plugin/src/main/scala/com/klibisz/elastiknn/mapper/VectorMapper.scala index 29d0b35fc..742112615 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 @@ -110,20 +110,24 @@ abstract class VectorMapper[V <: Vec: XContentCodec.Decoder] { self => private final class Builder(field: String, mapping: Mapping) extends FieldMapper.Builder(field) { + private val thisBuilder: Builder = this + override def build(context: MapperBuilderContext): FieldMapper = new FieldMapper( field, - new VectorMapper.FieldType(CONTENT_TYPE, context.buildFullName(name), mapping), + new VectorMapper.FieldType(CONTENT_TYPE, context.buildFullName(thisBuilder.leafName), mapping), multiFieldsBuilder.build(this, context), copyTo ) { + private val thisMapper: FieldMapper = this + override def parsesArrayValue(): Boolean = true override def parse(context: DocumentParserContext): Unit = { val doc = context.doc() val parser = context.parser() val vec: V = XContentCodec.decodeUnsafe[V](parser) - val fields = checkAndCreateFields(mapping, name, vec).get + val fields = checkAndCreateFields(mapping, thisMapper.fieldType().name(), vec).get fields.foreach(doc.add) } @@ -139,7 +143,7 @@ abstract class VectorMapper[V <: Vec: XContentCodec.Decoder] { self => XContentCodec.Encoder.mapping.encodeElastiknnObject(mapping, builder) } - override def getMergeBuilder: FieldMapper.Builder = new Builder(simpleName(), mapping) + override def getMergeBuilder: FieldMapper.Builder = new Builder(thisMapper.leafName(), mapping) } override def getParameters: Array[FieldMapper.Parameter[_]] = diff --git a/version b/version index 706594d66..6342972c1 100644 --- a/version +++ b/version @@ -1 +1 @@ -8.14.3.0 \ No newline at end of file +8.15.0.0 \ No newline at end of file