Skip to content

Commit fb46a5f

Browse files
alexklibiszclaude
andauthored
Dependencies: upgrade Elasticsearch to 9.3.0 (#845)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 1509d69 commit fb46a5f

7 files changed

Lines changed: 14 additions & 15 deletions

File tree

build.sbt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ Global / scalaVersion := "3.3.6"
77
Global / scalacOptions += "-explain"
88

99
lazy val CirceVersion = "0.14.14"
10-
lazy val ElasticsearchVersion = "9.2.0"
11-
lazy val Elastic4sVersion = "9.1.1"
10+
lazy val ElasticsearchVersion = "9.3.0"
11+
lazy val Elastic4sVersion = "9.3.0"
1212
lazy val ElastiknnVersion = IO.read(file("version")).strip()
13-
lazy val LuceneVersion = "10.3.1"
13+
lazy val LuceneVersion = "10.3.2"
1414

1515
// Setting this to simplify local development.
1616
// https://github.com/typelevel/sbt-tpolecat/tree/v0.5.1?tab=readme-ov-file#modes

client-python/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
elasticsearch==9.2.1
1+
elasticsearch==9.3.0
22
tqdm==4.61.1
33
scipy==1.10.1

docker/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
FROM docker.elastic.co/elasticsearch/elasticsearch:9.2.0
1+
FROM docker.elastic.co/elasticsearch/elasticsearch:9.3.0
22
COPY elastiknn-plugin/target/elastiknn*.zip .
3-
RUN elasticsearch-plugin install -b file:$(ls elastiknn*zip | sort | tail -n1)
3+
RUN PLUGIN=$(ls elastiknn*.zip | sort | tail -n1) && elasticsearch-plugin install -b "file://$PWD/$PLUGIN"

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:9.2.0
46-
RUN elasticsearch-plugin install --batch https://github.com/alexklibisz/elastiknn/releases/download/9.2.0.0/elastiknn-9.2.0.0.zip
45+
FROM docker.elastic.co/elasticsearch/elasticsearch:9.3.0
46+
RUN elasticsearch-plugin install --batch https://github.com/alexklibisz/elastiknn/releases/download/9.3.0.0/elastiknn-9.3.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-client-elastic4s/src/main/scala/com/klibisz/elastiknn/client/ElastiknnClient.scala

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.klibisz.elastiknn.client
22

3-
import com.fasterxml.jackson.module.scala.JavaTypeable
43
import com.klibisz.elastiknn.api._
54
import com.sksamuel.elastic4s.ElasticDsl._
65
import com.sksamuel.elastic4s._
@@ -25,11 +24,11 @@ trait ElastiknnClient[F[_]] extends AutoCloseable {
2524

2625
/** Abstract method for executing a request.
2726
*/
28-
def execute[T, U](request: T)(using handler: Handler[T, U], javaTypeable: JavaTypeable[U]): F[Response[U]]
27+
def execute[T, U](request: T)(using handler: Handler[T, U]): F[Response[U]]
2928

3029
/** Execute the given request.
3130
*/
32-
final def apply[T, U](request: T)(using handler: Handler[T, U], javaTypeable: JavaTypeable[U]): F[Response[U]] = execute(request)
31+
final def apply[T, U](request: T)(using handler: Handler[T, U]): F[Response[U]] = execute(request)
3332

3433
/** See ElastiknnRequests.putMapping().
3534
*/
@@ -118,8 +117,8 @@ object ElastiknnClient {
118117
new ElastiknnFutureClient {
119118
given cats.Functor[Future] = catsStdInstancesForFuture
120119
val elasticClient: ElasticClient[Future] = ElasticClient(jc)
121-
override def execute[T, U](req: T)(using handler: Handler[T, U], javaTypeable: JavaTypeable[U]): Future[Response[U]] = {
122-
val future: Future[Response[U]] = elasticClient.execute(req)
120+
override def execute[T, U](req: T)(using handler: Handler[T, U]): Future[Response[U]] = {
121+
val future: Future[Response[U]] = elasticClient.execute(req)(using handler, CommonRequestOptions.defaults)
123122
if (strictFailure) future.flatMap { res =>
124123
checkResponse(req, res) match {
125124
case Left(ex) => Future.failed(ex)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ object VectorMapper {
6868

6969
// TODO: 7.9.x. Unsure if the constructor params passed to the superclass are correct.
7070
class FieldType(contentTypeName: String, fieldName: String, val mapping: Mapping)
71-
extends MappedFieldType(fieldName, true, true, true, Collections.emptyMap()) {
71+
extends MappedFieldType(fieldName, IndexType.terms(true, true), false, Collections.emptyMap()) {
7272
override def typeName(): String = contentTypeName
7373
override def clone(): FieldType = new FieldType(contentTypeName, fieldName, mapping)
7474
override def termQuery(value: Any, context: SearchExecutionContext): Query = {

version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
9.2.0.0
1+
9.3.0.0

0 commit comments

Comments
 (0)