Update RedisMemoryStore.java

fix return - empty maps should return Mono.empty()
This commit is contained in:
j8-redis
2024-02-07 16:17:49 -05:00
parent 4e23aea595
commit cc991996f3
@@ -222,7 +222,7 @@ public class RedisMemoryStore implements MemoryStore {
Map<String, String> map = this.client.hgetAll(String.format("%s:%s",
collectionName, key).toLowerCase(Locale.ROOT));
if (map == null) {
if (map == null || map.isEmpty()) {
return Mono.empty();
}
MemoryRecord record = RedisMemoryRecord.mapToRecord(map, withEmbedding);