spring-projects/spring-ai · warning
Unsupported value type
Error message
Unsupported value type: ${value.getKindCase()} What it means
QdrantObjectFactory.object() converts a Qdrant protobuf Value into a Java object via a switch on KindCase. When a value kind is not in the handled set, it warns 'Unsupported value type' and yields null, so the payload field silently becomes null in the returned Document metadata.
Solutions
- Store integers as doubles (or strings) in Qdrant payloads so they map to DOUBLE_VALUE
- Check the logged KindCase and upgrade spring-ai-qdrant-store to a version handling that kind
- Add a custom payload converter / post-process Documents to restore the affected metadata field
- File/verify against the Spring AI issue tracker if a supported kind (e.g. INT64_VALUE) is unhandled
Example fix
// before
payload.put("count", 42); // Integer -> INT64_VALUE, reads back as null
// after
payload.put("count", 42.0); // Double -> DOUBLE_VALUE, round-trips Defensive patterns
Strategy: type-guard
Validate before calling
// check metadata after reading from Qdrant
if (doc.getMetadata().get("count") == null && expectedCount != null) {
logger.warn("Qdrant payload field 'count' was dropped as unsupported value kind");
} Type guard
Object v = doc.getMetadata().get(fieldName);
if (v instanceof Integer) {
// likely came back as null from Qdrant; store doubles instead
} Prevention
- Store numeric payload values as doubles in Qdrant
- Avoid payload types outside Double/Bool/List/Struct/Null
- Upgrade spring-ai-qdrant-store when new Qdrant value kinds appear
- Post-validate Document metadata after retrieval
When it happens
Trigger: Reading points from Qdrant whose payload contains a Value kind not covered by the switch (only Double, Bool, List, Struct, Null handled) — e.g. Integer (INT64_VALUE) values or newer Qdrant payload types depending on client version.
Common situations: Storing integer payload values in Qdrant and reading them back (metadata becomes null); using a newer Qdrant server/client with additional value kinds; version drift between qdrant-client protobuf definitions and the converter.
Related errors
- Failed to delete documents by filter
- Failed to delete documents by filter:
- Invalid value type for EQ. Can either be a string or Number
- Invalid value type for NEQ. Can either be a string or Number
- Media URL response exceeds maximum allowed size of bytes:
AI-assisted analysis of spring-projects/spring-ai@98a7beda4f (2026-09-11).
Data as JSON: /api/errors/dca7f16e9e96023d.
Report an issue: GitHub.
Appendix: source
Thrown at vector-stores/spring-ai-qdrant-store/src/main/java/org/springframework/ai/vectorstore/qdrant/QdrantObjectFactory.java:68
return map;
}
private static Object object(ListValue listValue) {
return listValue.getValuesList().stream().map(QdrantObjectFactory::object).toList();
}
private static @Nullable Object object(Value value) {
return switch (value.getKindCase()) {
case INTEGER_VALUE -> value.getIntegerValue();
case STRING_VALUE -> value.getStringValue();
case DOUBLE_VALUE -> value.getDoubleValue();
case BOOL_VALUE -> value.getBoolValue();
case LIST_VALUE -> object(value.getListValue());
case STRUCT_VALUE -> toObjectMap(value.getStructValue().getFieldsMap());
case NULL_VALUE -> null;
default -> {
logger.warn("Unsupported value type: " + value.getKindCase());
yield null;
}
};
}
}
View on GitHub (pinned to 98a7beda4f)