You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Fix the QdrantValueFactory to handle "java.util.List" type
- Update the integration test to use List type values
Resolves#3164
Signed-off-by: Ilayaperumal Gopinathan <ilayaperumal.gopinathan@broadcom.com>
Copy file name to clipboardExpand all lines: vector-stores/spring-ai-qdrant-store/src/main/java/org/springframework/ai/vectorstore/qdrant/QdrantValueFactory.java
+15Lines changed: 15 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,7 @@
32
32
* Utility methods for building io.qdrant.client.grpc.JsonWithInt.Value from Java objects.
33
33
*
34
34
* @author Anush Shetty
35
+
* @author Ilayaperumal Gopinathan
35
36
* @since 0.8.1
36
37
*/
37
38
finalclassQdrantValueFactory {
@@ -65,6 +66,10 @@ private static Value value(Object value) {
65
66
returnvalue((Map<String, Object>) value);
66
67
}
67
68
69
+
if (valueinstanceofList) {
70
+
returnvalue((List<Object>) value);
71
+
}
72
+
68
73
switch (value.getClass().getSimpleName()) {
69
74
case"String":
70
75
returnValueFactory.value((String) value);
@@ -81,6 +86,16 @@ private static Value value(Object value) {
Copy file name to clipboardExpand all lines: vector-stores/spring-ai-qdrant-store/src/test/java/org/springframework/ai/vectorstore/qdrant/QdrantVectorStoreIT.java
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -79,10 +79,11 @@ public class QdrantVectorStoreIT extends BaseVectorStoreTests {
79
79
List<Document> documents = List.of(
80
80
newDocument("Spring AI rocks!! Spring AI rocks!! Spring AI rocks!! Spring AI rocks!! Spring AI rocks!!",
81
81
Collections.singletonMap("meta1", "meta1")),
82
-
newDocument("Hello World Hello World Hello World Hello World Hello World Hello World Hello World"),
82
+
newDocument("Hello World Hello World Hello World Hello World Hello World Hello World Hello World",
0 commit comments