Skip to content

Commit deb631f

Browse files
committed
Migrate vector store auto-configurations to dedicated modules
Move vector store auto-configuration classes to dedicated modules under auto-configurations/vector-stores/: - Creates separate modules for Milvus, Pinecone, Qdrant, and Typesense vector stores - Moves CommonVectorStoreProperties to spring-ai-core for better reusability - Updates pom.xml dependencies to maintain proper relationships between modules This change improves modularity by allowing each vector store implementation to be independently versioned and maintained, continuing the migration pattern established with previous vector stores. Signed-off-by: Soby Chacko <[email protected]>
1 parent b29076f commit deb631f

File tree

47 files changed

+553
-103
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+553
-103
lines changed
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~ Copyright 2023-2025 the original author or authors.
4+
~
5+
~ Licensed under the Apache License, Version 2.0 (the "License");
6+
~ you may not use this file except in compliance with the License.
7+
~ You may obtain a copy of the License at
8+
~
9+
~ https://www.apache.org/licenses/LICENSE-2.0
10+
~
11+
~ Unless required by applicable law or agreed to in writing, software
12+
~ distributed under the License is distributed on an "AS IS" BASIS,
13+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
~ See the License for the specific language governing permissions and
15+
~ limitations under the License.
16+
-->
17+
18+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19+
xmlns="http://maven.apache.org/POM/4.0.0"
20+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
21+
<modelVersion>4.0.0</modelVersion>
22+
<parent>
23+
<groupId>org.springframework.ai</groupId>
24+
<artifactId>spring-ai</artifactId>
25+
<version>1.0.0-SNAPSHOT</version>
26+
<relativePath>../../../pom.xml</relativePath>
27+
</parent>
28+
<artifactId>spring-ai-milvus-store-spring-boot-autoconfigure</artifactId>
29+
<packaging>jar</packaging>
30+
<name>Spring AI Auto Configuration for Weaviate vector store</name>
31+
<description>Spring AI Auto Configuration for Weaviate vector store</description>
32+
<url>https://github.com/spring-projects/spring-ai</url>
33+
34+
<scm>
35+
<url>https://github.com/spring-projects/spring-ai</url>
36+
<connection>git://github.com/spring-projects/spring-ai.git</connection>
37+
<developerConnection>[email protected]:spring-projects/spring-ai.git</developerConnection>
38+
</scm>
39+
40+
<dependencies>
41+
<!-- production dependencies -->
42+
<dependency>
43+
<groupId>org.springframework.ai</groupId>
44+
<artifactId>spring-ai-milvus-store</artifactId>
45+
<version>${project.parent.version}</version>
46+
<optional>true</optional>
47+
</dependency>
48+
<dependency>
49+
<groupId>org.springframework.boot</groupId>
50+
<artifactId>spring-boot-starter</artifactId>
51+
</dependency>
52+
<dependency>
53+
<groupId>org.springframework.boot</groupId>
54+
<artifactId>spring-boot-configuration-processor</artifactId>
55+
<optional>true</optional>
56+
</dependency>
57+
<!-- test dependencies -->
58+
<dependency>
59+
<groupId>org.springframework.ai</groupId>
60+
<artifactId>spring-ai-test</artifactId>
61+
<version>${project.parent.version}</version>
62+
<scope>test</scope>
63+
</dependency>
64+
<dependency>
65+
<groupId>org.springframework.boot</groupId>
66+
<artifactId>spring-boot-starter-test</artifactId>
67+
<scope>test</scope>
68+
</dependency>
69+
<dependency>
70+
<groupId>org.springframework.boot</groupId>
71+
<artifactId>spring-boot-testcontainers</artifactId>
72+
<scope>test</scope>
73+
</dependency>
74+
<dependency>
75+
<groupId>org.testcontainers</groupId>
76+
<artifactId>testcontainers</artifactId>
77+
<scope>test</scope>
78+
</dependency>
79+
<dependency>
80+
<groupId>org.testcontainers</groupId>
81+
<artifactId>junit-jupiter</artifactId>
82+
<scope>test</scope>
83+
</dependency>
84+
<dependency>
85+
<groupId>org.awaitility</groupId>
86+
<artifactId>awaitility</artifactId>
87+
<scope>test</scope>
88+
</dependency>
89+
<dependency>
90+
<groupId>org.testcontainers</groupId>
91+
<artifactId>milvus</artifactId>
92+
<scope>test</scope>
93+
</dependency>
94+
<dependency>
95+
<groupId>org.springframework.ai</groupId>
96+
<artifactId>spring-ai-transformers</artifactId>
97+
<version>${project.parent.version}</version>
98+
<scope>test</scope>
99+
</dependency>
100+
</dependencies>
101+
</project>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023-2024 the original author or authors.
2+
* Copyright 2023-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023-2024 the original author or authors.
2+
* Copyright 2023-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023-2024 the original author or authors.
2+
* Copyright 2023-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023-2024 the original author or authors.
2+
* Copyright 2023-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
1616

1717
package org.springframework.ai.autoconfigure.vectorstore.milvus;
1818

19-
import org.springframework.ai.autoconfigure.vectorstore.CommonVectorStoreProperties;
19+
import org.springframework.ai.vectorstore.properties.CommonVectorStoreProperties;
2020
import org.springframework.ai.vectorstore.milvus.MilvusVectorStore;
2121
import org.springframework.boot.context.properties.ConfigurationProperties;
2222
import org.springframework.util.Assert;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#
2+
# Copyright 2025-2025 the original author or authors.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# https://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
org.springframework.ai.autoconfigure.vectorstore.milvus.MilvusVectorStoreAutoConfiguration
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023-2024 the original author or authors.
2+
* Copyright 2023-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -29,6 +29,7 @@
2929
import org.springframework.ai.document.Document;
3030
import org.springframework.ai.embedding.EmbeddingModel;
3131
import org.springframework.ai.observation.conventions.VectorStoreProvider;
32+
import org.springframework.ai.test.vectorstore.ObservationTestUtil;
3233
import org.springframework.ai.transformers.TransformersEmbeddingModel;
3334
import org.springframework.ai.vectorstore.SearchRequest;
3435
import org.springframework.ai.vectorstore.VectorStore;
@@ -39,7 +40,6 @@
3940
import org.springframework.context.annotation.Configuration;
4041

4142
import static org.assertj.core.api.Assertions.assertThat;
42-
import static org.springframework.ai.autoconfigure.vectorstore.observation.ObservationTestUtil.assertObservationRegistry;
4343

4444
/**
4545
* @author Christian Tzolov
@@ -79,7 +79,7 @@ public void addAndSearch() {
7979

8080
vectorStore.add(this.documents);
8181

82-
assertObservationRegistry(observationRegistry, VectorStoreProvider.MILVUS,
82+
ObservationTestUtil.assertObservationRegistry(observationRegistry, VectorStoreProvider.MILVUS,
8383
VectorStoreObservationContext.Operation.ADD);
8484
observationRegistry.clear();
8585

@@ -94,7 +94,7 @@ public void addAndSearch() {
9494
assertThat(resultDoc.getMetadata()).hasSize(2);
9595
assertThat(resultDoc.getMetadata()).containsKeys("spring", "distance");
9696

97-
assertObservationRegistry(observationRegistry, VectorStoreProvider.MILVUS,
97+
ObservationTestUtil.assertObservationRegistry(observationRegistry, VectorStoreProvider.MILVUS,
9898
VectorStoreObservationContext.Operation.QUERY);
9999
observationRegistry.clear();
100100

@@ -104,7 +104,7 @@ public void addAndSearch() {
104104
results = vectorStore.similaritySearch(SearchRequest.builder().query("Spring").topK(1).build());
105105
assertThat(results).hasSize(0);
106106

107-
assertObservationRegistry(observationRegistry, VectorStoreProvider.MILVUS,
107+
ObservationTestUtil.assertObservationRegistry(observationRegistry, VectorStoreProvider.MILVUS,
108108
VectorStoreObservationContext.Operation.DELETE);
109109
observationRegistry.clear();
110110

@@ -131,7 +131,7 @@ public void searchWithCustomFields() {
131131

132132
vectorStore.add(this.documents);
133133

134-
assertObservationRegistry(observationRegistry, VectorStoreProvider.MILVUS,
134+
ObservationTestUtil.assertObservationRegistry(observationRegistry, VectorStoreProvider.MILVUS,
135135
VectorStoreObservationContext.Operation.ADD);
136136
observationRegistry.clear();
137137

@@ -146,7 +146,7 @@ public void searchWithCustomFields() {
146146
assertThat(resultDoc.getMetadata()).hasSize(2);
147147
assertThat(resultDoc.getMetadata()).containsKeys("spring", "distance");
148148

149-
assertObservationRegistry(observationRegistry, VectorStoreProvider.MILVUS,
149+
ObservationTestUtil.assertObservationRegistry(observationRegistry, VectorStoreProvider.MILVUS,
150150
VectorStoreObservationContext.Operation.QUERY);
151151
observationRegistry.clear();
152152

@@ -156,7 +156,7 @@ public void searchWithCustomFields() {
156156
results = vectorStore.similaritySearch(SearchRequest.builder().query("Spring").topK(1).build());
157157
assertThat(results).hasSize(0);
158158

159-
assertObservationRegistry(observationRegistry, VectorStoreProvider.MILVUS,
159+
ObservationTestUtil.assertObservationRegistry(observationRegistry, VectorStoreProvider.MILVUS,
160160
VectorStoreObservationContext.Operation.DELETE);
161161
observationRegistry.clear();
162162

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~ Copyright 2023-2025 the original author or authors.
4+
~
5+
~ Licensed under the Apache License, Version 2.0 (the "License");
6+
~ you may not use this file except in compliance with the License.
7+
~ You may obtain a copy of the License at
8+
~
9+
~ https://www.apache.org/licenses/LICENSE-2.0
10+
~
11+
~ Unless required by applicable law or agreed to in writing, software
12+
~ distributed under the License is distributed on an "AS IS" BASIS,
13+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
~ See the License for the specific language governing permissions and
15+
~ limitations under the License.
16+
-->
17+
18+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19+
xmlns="http://maven.apache.org/POM/4.0.0"
20+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
21+
<modelVersion>4.0.0</modelVersion>
22+
<parent>
23+
<groupId>org.springframework.ai</groupId>
24+
<artifactId>spring-ai</artifactId>
25+
<version>1.0.0-SNAPSHOT</version>
26+
<relativePath>../../../pom.xml</relativePath>
27+
</parent>
28+
<artifactId>spring-ai-pinecone-store-spring-boot-autoconfigure</artifactId>
29+
<packaging>jar</packaging>
30+
<name>Spring AI Auto Configuration for Weaviate vector store</name>
31+
<description>Spring AI Auto Configuration for Weaviate vector store</description>
32+
<url>https://github.com/spring-projects/spring-ai</url>
33+
34+
<scm>
35+
<url>https://github.com/spring-projects/spring-ai</url>
36+
<connection>git://github.com/spring-projects/spring-ai.git</connection>
37+
<developerConnection>[email protected]:spring-projects/spring-ai.git</developerConnection>
38+
</scm>
39+
40+
<dependencies>
41+
<!-- production dependencies -->
42+
<dependency>
43+
<groupId>org.springframework.ai</groupId>
44+
<artifactId>spring-ai-pinecone-store</artifactId>
45+
<version>${project.parent.version}</version>
46+
<optional>true</optional>
47+
</dependency>
48+
<dependency>
49+
<groupId>org.springframework.boot</groupId>
50+
<artifactId>spring-boot-starter</artifactId>
51+
</dependency>
52+
<dependency>
53+
<groupId>org.springframework.boot</groupId>
54+
<artifactId>spring-boot-configuration-processor</artifactId>
55+
<optional>true</optional>
56+
</dependency>
57+
<!-- test dependencies -->
58+
<dependency>
59+
<groupId>org.springframework.ai</groupId>
60+
<artifactId>spring-ai-test</artifactId>
61+
<version>${project.parent.version}</version>
62+
<scope>test</scope>
63+
</dependency>
64+
<dependency>
65+
<groupId>org.springframework.boot</groupId>
66+
<artifactId>spring-boot-starter-test</artifactId>
67+
<scope>test</scope>
68+
</dependency>
69+
<dependency>
70+
<groupId>org.springframework.boot</groupId>
71+
<artifactId>spring-boot-testcontainers</artifactId>
72+
<scope>test</scope>
73+
</dependency>
74+
<dependency>
75+
<groupId>org.testcontainers</groupId>
76+
<artifactId>testcontainers</artifactId>
77+
<scope>test</scope>
78+
</dependency>
79+
<dependency>
80+
<groupId>org.testcontainers</groupId>
81+
<artifactId>junit-jupiter</artifactId>
82+
<scope>test</scope>
83+
</dependency>
84+
<dependency>
85+
<groupId>org.awaitility</groupId>
86+
<artifactId>awaitility</artifactId>
87+
<scope>test</scope>
88+
</dependency>
89+
<dependency>
90+
<groupId>org.springframework.ai</groupId>
91+
<artifactId>spring-ai-transformers</artifactId>
92+
<version>${project.parent.version}</version>
93+
<scope>test</scope>
94+
</dependency>
95+
</dependencies>
96+
</project>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023-2024 the original author or authors.
2+
* Copyright 2023-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023-2024 the original author or authors.
2+
* Copyright 2023-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)