From 0995515f2f9c9e5205250a243e7bd496252e0d00 Mon Sep 17 00:00:00 2001 From: Anush008 Date: Fri, 1 Mar 2024 15:01:53 +0530 Subject: [PATCH] Minor code and doc adjustments - chore: renamed test file - fix: BOOL_VALUE ObjectFactory --- ...rtiesTests.java => QdrantVectorStorePropertiesTests.java} | 2 +- .../ai/vectorstore/qdrant/QdrantObjectFactory.java | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) rename spring-ai-spring-boot-autoconfigure/src/test/java/org/springframework/ai/autoconfigure/vectorstore/qdrant/{PgVectorStorePropertiesTests.java => QdrantVectorStorePropertiesTests.java} (97%) diff --git a/spring-ai-spring-boot-autoconfigure/src/test/java/org/springframework/ai/autoconfigure/vectorstore/qdrant/PgVectorStorePropertiesTests.java b/spring-ai-spring-boot-autoconfigure/src/test/java/org/springframework/ai/autoconfigure/vectorstore/qdrant/QdrantVectorStorePropertiesTests.java similarity index 97% rename from spring-ai-spring-boot-autoconfigure/src/test/java/org/springframework/ai/autoconfigure/vectorstore/qdrant/PgVectorStorePropertiesTests.java rename to spring-ai-spring-boot-autoconfigure/src/test/java/org/springframework/ai/autoconfigure/vectorstore/qdrant/QdrantVectorStorePropertiesTests.java index 8eb6a555d..b861fd703 100644 --- a/spring-ai-spring-boot-autoconfigure/src/test/java/org/springframework/ai/autoconfigure/vectorstore/qdrant/PgVectorStorePropertiesTests.java +++ b/spring-ai-spring-boot-autoconfigure/src/test/java/org/springframework/ai/autoconfigure/vectorstore/qdrant/QdrantVectorStorePropertiesTests.java @@ -23,7 +23,7 @@ import static org.assertj.core.api.Assertions.assertThat; /** * @author Christian Tzolov */ -public class PgVectorStorePropertiesTests { +public class QdrantVectorStorePropertiesTests { @Test public void defaultValues() { diff --git a/vector-stores/spring-ai-qdrant/src/main/java/org/springframework/ai/vectorstore/qdrant/QdrantObjectFactory.java b/vector-stores/spring-ai-qdrant/src/main/java/org/springframework/ai/vectorstore/qdrant/QdrantObjectFactory.java index 721efa012..d87dbddba 100644 --- a/vector-stores/spring-ai-qdrant/src/main/java/org/springframework/ai/vectorstore/qdrant/QdrantObjectFactory.java +++ b/vector-stores/spring-ai-qdrant/src/main/java/org/springframework/ai/vectorstore/qdrant/QdrantObjectFactory.java @@ -58,13 +58,14 @@ class QdrantObjectFactory { case DOUBLE_VALUE: return value.getDoubleValue(); case BOOL_VALUE: - return value.hasBoolValue(); + return value.getBoolValue(); case LIST_VALUE: return object(value.getListValue()); case STRUCT_VALUE: return toObjectMap(value.getStructValue().getFieldsMap()); - case KIND_NOT_SET: case NULL_VALUE: + return null; + case KIND_NOT_SET: default: logger.warn("Unsupported value type: " + value.getKindCase()); return null;