{"record":{"id":"dca7f16e9e96023d","repo":"spring-projects/spring-ai","slug":"unsupported-value-type-value-getkindcase","errorCode":null,"errorMessage":"Unsupported value type: ${value.getKindCase()}","messagePattern":"Unsupported value type: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"vector-stores/spring-ai-qdrant-store/src/main/java/org/springframework/ai/vectorstore/qdrant/QdrantObjectFactory.java","lineNumber":68,"sourceCode":"\t\treturn map;\n\t}\n\n\tprivate static Object object(ListValue listValue) {\n\t\treturn listValue.getValuesList().stream().map(QdrantObjectFactory::object).toList();\n\t}\n\n\tprivate static @Nullable Object object(Value value) {\n\n\t\treturn switch (value.getKindCase()) {\n\t\t\tcase INTEGER_VALUE -> value.getIntegerValue();\n\t\t\tcase STRING_VALUE -> value.getStringValue();\n\t\t\tcase DOUBLE_VALUE -> value.getDoubleValue();\n\t\t\tcase BOOL_VALUE -> value.getBoolValue();\n\t\t\tcase LIST_VALUE -> object(value.getListValue());\n\t\t\tcase STRUCT_VALUE -> toObjectMap(value.getStructValue().getFieldsMap());\n\t\t\tcase NULL_VALUE -> null;\n\t\t\tdefault -> {\n\t\t\t\tlogger.warn(\"Unsupported value type: \" + value.getKindCase());\n\t\t\t\tyield null;\n\t\t\t}\n\t\t};\n\n\t}\n\n}\n","sourceCodeStart":50,"sourceCodeEnd":76,"githubUrl":"https://github.com/spring-projects/spring-ai/blob/98a7beda4f29d80a71c5837eb4053b03a93a46f7/vector-stores/spring-ai-qdrant-store/src/main/java/org/springframework/ai/vectorstore/qdrant/QdrantObjectFactory.java#L50-L76","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before\npayload.put(\"count\", 42); // Integer -> INT64_VALUE, reads back as null\n\n// after\npayload.put(\"count\", 42.0); // Double -> DOUBLE_VALUE, round-trips","handlingStrategy":"type-guard","validationCode":"// check metadata after reading from Qdrant\nif (doc.getMetadata().get(\"count\") == null && expectedCount != null) {\n    logger.warn(\"Qdrant payload field 'count' was dropped as unsupported value kind\");\n}","typeGuard":"Object v = doc.getMetadata().get(fieldName);\nif (v instanceof Integer) {\n    // likely came back as null from Qdrant; store doubles instead\n}","tryCatchPattern":null,"preventionTips":["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"],"tags":["qdrant","protobuf","payload","type-mapping"],"backgroundTag":"unsupported-enum-value","analyzedSha":"98a7beda4f29d80a71c5837eb4053b03a93a46f7","analyzedAt":"2026-09-11T14:15:49.441Z","contentChangedAt":"2026-09-11T14:15:49.441Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}