diff --git a/demos/roms-documents/pom.xml b/demos/roms-documents/pom.xml
index d7432215..f5a9d016 100644
--- a/demos/roms-documents/pom.xml
+++ b/demos/roms-documents/pom.xml
@@ -31,7 +31,7 @@
com.redis.om
redis-om-spring
- 0.9.3
+ 0.9.4-SNAPSHOT
org.springframework.boot
diff --git a/demos/roms-hashes/pom.xml b/demos/roms-hashes/pom.xml
index 62ddc21e..a10381c9 100644
--- a/demos/roms-hashes/pom.xml
+++ b/demos/roms-hashes/pom.xml
@@ -30,7 +30,7 @@
com.redis.om
redis-om-spring
- 0.9.3
+ 0.9.4-SNAPSHOT
org.springframework.boot
diff --git a/demos/roms-permits/pom.xml b/demos/roms-permits/pom.xml
index 1ddc7357..4eed59db 100644
--- a/demos/roms-permits/pom.xml
+++ b/demos/roms-permits/pom.xml
@@ -34,7 +34,7 @@
com.redis.om
redis-om-spring
- 0.9.3
+ 0.9.4-SNAPSHOT
diff --git a/demos/roms-vss/pom.xml b/demos/roms-vss/pom.xml
index 5dcf0ef9..d4e63ee4 100644
--- a/demos/roms-vss/pom.xml
+++ b/demos/roms-vss/pom.xml
@@ -30,7 +30,7 @@
com.redis.om
redis-om-spring
- 0.9.3
+ 0.9.4-SNAPSHOT
org.springframework.boot
diff --git a/pom.xml b/pom.xml
index 32b81834..db208f95 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
4.0.0
com.redis.om
redis-om-spring-parent
- 0.9.3
+ 0.9.4-SNAPSHOT
redis-om-spring-parent
pom
diff --git a/redis-om-spring/pom.xml b/redis-om-spring/pom.xml
index f2e49ad3..d52e26f6 100644
--- a/redis-om-spring/pom.xml
+++ b/redis-om-spring/pom.xml
@@ -7,7 +7,7 @@
com.redis.om
redis-om-spring
- 0.9.3
+ 0.9.4-SNAPSHOT
jar
redis-om-spring
diff --git a/redis-om-spring/src/main/java/com/redis/om/spring/repository/query/RediSearchQuery.java b/redis-om-spring/src/main/java/com/redis/om/spring/repository/query/RediSearchQuery.java
index 8c7c9e43..d9888da0 100644
--- a/redis-om-spring/src/main/java/com/redis/om/spring/repository/query/RediSearchQuery.java
+++ b/redis-om-spring/src/main/java/com/redis/om/spring/repository/query/RediSearchQuery.java
@@ -501,18 +501,13 @@ private Object executeQuery(Object[] parameters) {
}
private Object parseDocumentResult(redis.clients.jedis.search.Document doc) {
- Gson gsonInstance = getGson();
-
- if (doc == null) {
- return gsonInstance.fromJson("", domainType);
+ if (doc == null || doc.get("$") == null) {
+ return null;
}
- if (doc.get("$") != null) {
- return gsonInstance.fromJson(SafeEncoder.encode((byte[]) doc.get("$")), domainType);
- }
+ Gson gsonInstance = getGson();
- return gsonInstance.fromJson(gsonInstance.toJsonTree(StreamSupport.stream(doc.getProperties().spliterator(), false)
- .collect(Collectors.toMap(Entry::getKey, entry -> SafeEncoder.encode((byte[]) entry.getValue())))), domainType);
+ return gsonInstance.fromJson(SafeEncoder.encode((byte[]) doc.get("$")), domainType);
}
private Object executeDeleteQuery(Object[] parameters) {