Commit 21c2773
committed
GH-2137: Add getNativeClient API to VectorStore interface
Fixes: #2137
Adds getNativeClient API to VectorStore interface allowing access to the underlying native client implementation.
This change:
- Adds getNativeClient() default method to VectorStore interface returning Optional<T>
- Implements getNativeClient() in all vector store implementations exposing their respective native clients
- Adds integration tests verifying native client access for all implementations
Signed-off-by: Soby Chacko <[email protected]>1 parent 3d3c20d commit 21c2773
File tree
35 files changed
+325
-2
lines changed- spring-ai-core/src/main/java/org/springframework/ai/vectorstore
- vector-stores
- spring-ai-azure-cosmos-db-store/src
- main/java/org/springframework/ai/vectorstore/cosmosdb
- test/java/org/springframework/ai/vectorstore/cosmosdb
- spring-ai-azure-store/src
- main/java/org/springframework/ai/vectorstore/azure
- test/java/org/springframework/ai/vectorstore/azure
- spring-ai-cassandra-store/src
- main/java/org/springframework/ai/vectorstore/cassandra
- test/java/org/springframework/ai/vectorstore/cassandra
- spring-ai-coherence-store/src
- main/java/org/springframework/ai/vectorstore/coherence
- test/java/org/springframework/ai/vectorstore/coherence
- spring-ai-elasticsearch-store/src
- main/java/org/springframework/ai/vectorstore/elasticsearch
- test/java/org/springframework/ai/vectorstore/elasticsearch
- spring-ai-mariadb-store/src
- main/java/org/springframework/ai/vectorstore/mariadb
- test/java/org/springframework/ai/vectorstore/mariadb
- spring-ai-milvus-store/src
- main/java/org/springframework/ai/vectorstore/milvus
- test/java/org/springframework/ai/vectorstore/milvus
- spring-ai-mongodb-atlas-store/src
- main/java/org/springframework/ai/vectorstore/mongodb/atlas
- test/java/org/springframework/ai/vectorstore/mongodb/atlas
- spring-ai-neo4j-store/src
- main/java/org/springframework/ai/vectorstore/neo4j
- test/java/org/springframework/ai/vectorstore/neo4j
- spring-ai-opensearch-store/src
- main/java/org/springframework/ai/vectorstore/opensearch
- test/java/org/springframework/ai/vectorstore/opensearch
- spring-ai-oracle-store/src
- main/java/org/springframework/ai/vectorstore/oracle
- test/java/org/springframework/ai/vectorstore/oracle
- spring-ai-pgvector-store/src
- main/java/org/springframework/ai/vectorstore/pgvector
- test/java/org/springframework/ai/vectorstore/pgvector
- spring-ai-pinecone-store/src
- main/java/org/springframework/ai/vectorstore/pinecone
- test/java/org/springframework/ai/vectorstore/pinecone
- spring-ai-qdrant-store/src
- main/java/org/springframework/ai/vectorstore/qdrant
- test/java/org/springframework/ai/vectorstore/qdrant
- spring-ai-redis-store/src
- main/java/org/springframework/ai/vectorstore/redis
- test/java/org/springframework/ai/vectorstore/redis
- spring-ai-typesense-store/src
- main/java/org/springframework/ai/vectorstore/typesense
- test/java/org/springframework/ai/vectorstore/typesense
- spring-ai-weaviate-store/src
- main/java/org/springframework/ai/vectorstore/weaviate
- test/java/org/springframework/ai/vectorstore/weaviate
35 files changed
+325
-2
lines changedLines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
111 | 129 | | |
112 | 130 | | |
113 | 131 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
375 | 382 | | |
376 | 383 | | |
377 | 384 | | |
| |||
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
169 | 171 | | |
170 | 172 | | |
171 | 173 | | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
172 | 183 | | |
173 | 184 | | |
174 | 185 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
332 | 332 | | |
333 | 333 | | |
334 | 334 | | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
335 | 342 | | |
336 | 343 | | |
337 | 344 | | |
| |||
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| |||
318 | 320 | | |
319 | 321 | | |
320 | 322 | | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
321 | 332 | | |
322 | 333 | | |
323 | 334 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
712 | 712 | | |
713 | 713 | | |
714 | 714 | | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
715 | 722 | | |
716 | 723 | | |
717 | 724 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
524 | 525 | | |
525 | 526 | | |
526 | 527 | | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
527 | 537 | | |
528 | 538 | | |
529 | 539 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
278 | 285 | | |
279 | 286 | | |
280 | 287 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
290 | 291 | | |
291 | 292 | | |
292 | 293 | | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
293 | 303 | | |
294 | 304 | | |
295 | 305 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
357 | 364 | | |
358 | 365 | | |
359 | 366 | | |
| |||
0 commit comments