Skip to content

Commit

Permalink
Dependencies: Update elasticsearch, ... from 8.14.3 to 8.15.0 (#711)
Browse files Browse the repository at this point in the history
Co-authored-by: alexklibisz-scala-steward[bot] <125160947+alexklibisz-scala-steward[bot]@users.noreply.github.com>
Co-authored-by: Alex Klibisz <8015228+alexklibisz@users.noreply.github.com>
  • Loading branch information
1 parent 0eab459 commit 9e320dd
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -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)
4 changes: 2 additions & 2 deletions docs/pages/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand All @@ -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[_]] =
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.14.3.0
8.15.0.0

0 comments on commit 9e320dd

Please sign in to comment.