Skip to content

Commit 44ae584

Browse files
committed
fix(qdrant): support Long type in payload by converting to String
Qdrant does not support java.lang.Long as a native payload type. Previously, passing a Long value caused the following exception: java.lang.IllegalArgumentException: Unsupported Qdrant value type: class java.lang.Long at org.springframework.ai.vectorstore.qdrant.QdrantValueFactory.value(QdrantValueFactory.java:85) at org.springframework.ai.vectorstore.qdrant.QdrantValueFactory.lambda$toValueMap$1(QdrantValueFactory.java:46) ... To resolve this, Long values are now converted to their String representation in QdrantValueFactory. This preserves precision and avoids serialization issues. Signed-off-by: Solomon Hsu <[email protected]>
1 parent 2aa23df commit 44ae584

File tree

1 file changed

+3
-0
lines changed
  • vector-stores/spring-ai-qdrant-store/src/main/java/org/springframework/ai/vectorstore/qdrant

1 file changed

+3
-0
lines changed

vector-stores/spring-ai-qdrant-store/src/main/java/org/springframework/ai/vectorstore/qdrant/QdrantValueFactory.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ private static Value value(Object value) {
7575
return ValueFactory.value((String) value);
7676
case "Integer":
7777
return ValueFactory.value((Integer) value);
78+
case "Long":
79+
// use String representation
80+
return ValueFactory.value(String.valueOf(value));
7881
case "Double":
7982
return ValueFactory.value((Double) value);
8083
case "Float":

0 commit comments

Comments
 (0)