Skip to content

Commit 9e320dd

Browse files
Dependencies: Update elasticsearch, ... from 8.14.3 to 8.15.0 (#711)
Co-authored-by: alexklibisz-scala-steward[bot] <125160947+alexklibisz-scala-steward[bot]@users.noreply.github.com> Co-authored-by: Alex Klibisz <[email protected]>
1 parent 0eab459 commit 9e320dd

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Global / scalaVersion := "3.3.3"
66
Global / scalacOptions += "-explain"
77

88
lazy val CirceVersion = "0.14.9"
9-
lazy val ElasticsearchVersion = "8.14.3"
9+
lazy val ElasticsearchVersion = "8.15.0"
1010
lazy val Elastic4sVersion = "8.14.1"
1111
lazy val ElastiknnVersion = IO.read(file("version")).strip()
1212
lazy val LuceneVersion = "9.10.0"

docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
FROM docker.elastic.co/elasticsearch/elasticsearch:8.14.3
1+
FROM docker.elastic.co/elasticsearch/elasticsearch:8.15.0
22
COPY elastiknn-plugin/target/elastiknn*.zip .
33
RUN elasticsearch-plugin install -b file:$(ls elastiknn*zip | sort | tail -n1)

docs/pages/installation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ Make a Dockerfile like below.
4242
The image version (`elasticsearch:A.B.C`) must match the plugin's version (e.g. `A.B.C.x/elastiknn-A.B.C.x`).
4343

4444
```docker
45-
FROM docker.elastic.co/elasticsearch/elasticsearch:8.14.3
46-
RUN elasticsearch-plugin install --batch https://github.com/alexklibisz/elastiknn/releases/download/8.14.3.0/elastiknn-8.14.3.0.zip
45+
FROM docker.elastic.co/elasticsearch/elasticsearch:8.15.0
46+
RUN elasticsearch-plugin install --batch https://github.com/alexklibisz/elastiknn/releases/download/8.15.0.0/elastiknn-8.15.0.0.zip
4747
```
4848

4949
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)

elastiknn-plugin/src/main/scala/com/klibisz/elastiknn/mapper/VectorMapper.scala

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,20 +110,24 @@ abstract class VectorMapper[V <: Vec: XContentCodec.Decoder] { self =>
110110

111111
private final class Builder(field: String, mapping: Mapping) extends FieldMapper.Builder(field) {
112112

113+
private val thisBuilder: Builder = this
114+
113115
override def build(context: MapperBuilderContext): FieldMapper =
114116
new FieldMapper(
115117
field,
116-
new VectorMapper.FieldType(CONTENT_TYPE, context.buildFullName(name), mapping),
118+
new VectorMapper.FieldType(CONTENT_TYPE, context.buildFullName(thisBuilder.leafName), mapping),
117119
multiFieldsBuilder.build(this, context),
118120
copyTo
119121
) {
122+
private val thisMapper: FieldMapper = this
123+
120124
override def parsesArrayValue(): Boolean = true
121125

122126
override def parse(context: DocumentParserContext): Unit = {
123127
val doc = context.doc()
124128
val parser = context.parser()
125129
val vec: V = XContentCodec.decodeUnsafe[V](parser)
126-
val fields = checkAndCreateFields(mapping, name, vec).get
130+
val fields = checkAndCreateFields(mapping, thisMapper.fieldType().name(), vec).get
127131
fields.foreach(doc.add)
128132
}
129133

@@ -139,7 +143,7 @@ abstract class VectorMapper[V <: Vec: XContentCodec.Decoder] { self =>
139143
XContentCodec.Encoder.mapping.encodeElastiknnObject(mapping, builder)
140144
}
141145

142-
override def getMergeBuilder: FieldMapper.Builder = new Builder(simpleName(), mapping)
146+
override def getMergeBuilder: FieldMapper.Builder = new Builder(thisMapper.leafName(), mapping)
143147
}
144148

145149
override def getParameters: Array[FieldMapper.Parameter[_]] =

version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.14.3.0
1+
8.15.0.0

0 commit comments

Comments
 (0)