Skip to content

Commit 8b9d93f

Browse files
ilayaperumalgmarkpollack
authored andcommitted
Upgrade Spring Boot to 3.5.0
- Update Spring Boot version to 3.5.0 - Enforce elasticsearch-java client to use the explicit version 8.18.1 - This is because of the incompatibility between Spring Boot 3.4.x and 3.5.0 in using the elastic search java client versions 8.15.1 vs 8.18.1 Signed-off-by: Ilayaperumal Gopinathan <ilayaperumal.gopinathan@broadcom.com>
1 parent 379901b commit 8b9d93f

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@
253253
<kotlin.compiler.jvmTarget>${java.version}</kotlin.compiler.jvmTarget>
254254

255255
<!-- production dependencies -->
256-
<spring-boot.version>3.4.5</spring-boot.version>
256+
<spring-boot.version>3.5.0</spring-boot.version>
257257
<ST4.version>4.3.4</ST4.version>
258258
<azure-open-ai-client.version>1.0.0-beta.16</azure-open-ai-client.version>
259259
<jtokkit.version>1.1.0</jtokkit.version>
@@ -296,6 +296,7 @@
296296
<azure-identity.version>1.15.4</azure-identity.version>
297297
<azure-search.version>11.7.6</azure-search.version>
298298
<azure-cosmos.version>5.22.0</azure-cosmos.version>
299+
<elasticsearch-java.version>8.18.1</elasticsearch-java.version>
299300
<weaviate-client.version>5.2.0</weaviate-client.version>
300301
<qdrant.version>1.13.0</qdrant.version>
301302
<typesense.version>1.3.0</typesense.version>

vector-stores/spring-ai-elasticsearch-store/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
<dependency>
5454
<groupId>co.elastic.clients</groupId>
5555
<artifactId>elasticsearch-java</artifactId>
56+
<version>${elasticsearch-java.version}</version>
5657
</dependency>
5758

5859
<!-- TESTING -->

vector-stores/spring-ai-elasticsearch-store/src/main/java/org/springframework/ai/vectorstore/elasticsearch/ElasticsearchVectorStore.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import java.util.stream.Collectors;
2525

2626
import co.elastic.clients.elasticsearch.ElasticsearchClient;
27+
import co.elastic.clients.elasticsearch._types.mapping.DenseVectorSimilarity;
2728
import co.elastic.clients.elasticsearch.core.BulkRequest;
2829
import co.elastic.clients.elasticsearch.core.BulkResponse;
2930
import co.elastic.clients.elasticsearch.core.SearchResponse;
@@ -329,7 +330,8 @@ private void createIndexMapping() {
329330
this.elasticsearchClient.indices()
330331
.create(cr -> cr.index(this.options.getIndexName())
331332
.mappings(map -> map.properties(this.options.getEmbeddingFieldName(),
332-
p -> p.denseVector(dv -> dv.similarity(this.options.getSimilarity().toString())
333+
p -> p.denseVector(dv -> dv
334+
.similarity(DenseVectorSimilarity.valueOf(this.options.getSimilarity().toString()))
333335
.dims(this.options.getDimensions())))));
334336
}
335337
catch (IOException e) {

0 commit comments

Comments
 (0)