File tree Expand file tree Collapse file tree 6 files changed +7
-12
lines changed
spring-ai-alibaba-chat-memory-example
spring-ai-alibaba-rag-example
src/main/java/com/alibaba/cloud/ai/example/rag/init
rag-elasticsearch-autoconfigure-example
rag-elasticsearch-example
src/main/java/com/alibaba/cloud/ai/example/rag/local Expand file tree Collapse file tree 6 files changed +7
-12
lines changed Original file line number Diff line number Diff line change 8989 <groupId >org.springframework.ai</groupId >
9090 <artifactId >spring-ai-advisors-vector-store</artifactId >
9191 </dependency >
92-
93- <dependency >
94- <groupId >co.elastic.clients</groupId >
95- <artifactId >elasticsearch-java</artifactId >
96- <version >8.15.5</version >
97- </dependency >
9892
9993 </dependencies >
10094
Original file line number Diff line number Diff line change 6262 <dependency >
6363 <groupId >co.elastic.clients</groupId >
6464 <artifactId >elasticsearch-java</artifactId >
65- <version >8.13.4 </version >
65+ <version >8.18.1 </version >
6666 <exclusions >
6767 <exclusion >
6868 <artifactId >elasticsearch-rest-client</artifactId >
7373 <dependency >
7474 <artifactId >elasticsearch-rest-client</artifactId >
7575 <groupId >org.elasticsearch.client</groupId >
76- <version >8.13.4 </version >
76+ <version >8.18.1 </version >
7777 </dependency >
7878
7979 <dependency >
Original file line number Diff line number Diff line change 2424
2525import co .elastic .clients .elasticsearch .ElasticsearchClient ;
2626import co .elastic .clients .elasticsearch ._types .mapping .DenseVectorProperty ;
27+ import co .elastic .clients .elasticsearch ._types .mapping .DenseVectorSimilarity ;
2728import co .elastic .clients .elasticsearch ._types .mapping .KeywordProperty ;
2829import co .elastic .clients .elasticsearch ._types .mapping .ObjectProperty ;
2930import co .elastic .clients .elasticsearch ._types .mapping .Property ;
@@ -125,7 +126,7 @@ private void createIndexIfNotExists() {
125126 // Maybe using json directly?
126127 Map <String , Property > properties = new HashMap <>();
127128 properties .put (vectorField , Property .of (property -> property .denseVector (
128- DenseVectorProperty .of (dense -> dense .index (true ).dims (dimsLength ).similarity (similarityAlgo )))));
129+ DenseVectorProperty .of (dense -> dense .index (true ).dims (dimsLength ).similarity (DenseVectorSimilarity . valueOf ( similarityAlgo ) )))));
129130 properties .put (textField , Property .of (property -> property .text (TextProperty .of (t -> t ))));
130131
131132 Map <String , Property > metadata = new HashMap <>();
Original file line number Diff line number Diff line change 6060 <dependency >
6161 <groupId >co.elastic.clients</groupId >
6262 <artifactId >elasticsearch-java</artifactId >
63- <version >8.13.3 </version >
63+ <version >8.18.1 </version >
6464 </dependency >
6565 </dependencies >
6666 </dependencyManagement >
Original file line number Diff line number Diff line change 7272 <dependency >
7373 <groupId >co.elastic.clients</groupId >
7474 <artifactId >elasticsearch-java</artifactId >
75- <version >8.13.3 </version >
75+ <version >8.18.1 </version >
7676 </dependency >
7777 </dependencies >
7878 </dependencyManagement >
Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ private void createIndexIfNotExists() {
147147 // Maybe using json directly?
148148 Map <String , Property > properties = new HashMap <>();
149149 properties .put (vectorField , Property .of (property -> property .denseVector (
150- DenseVectorProperty .of (dense -> dense .index (true ).dims (dimsLength ).similarity (similarityAlgo )))));
150+ DenseVectorProperty .of (dense -> dense .index (true ).dims (dimsLength ).similarity (DenseVectorSimilarity . valueOf ( similarityAlgo ) )))));
151151 properties .put (textField , Property .of (property -> property .text (TextProperty .of (t -> t ))));
152152
153153 Map <String , Property > metadata = new HashMap <>();
You can’t perform that action at this time.
0 commit comments