Skip to content

Commit 6ba28d4

Browse files
committed
using hsetnx to speedup load in case of vector present
1 parent 38fb0c6 commit 6ba28d4

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

engine/clients/redis/upload.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,13 @@ def upload_batch(
8686
}
8787
cls.client.hsetnx(
8888
str(idx),
89-
mapping={
90-
"vector": np.array(vec).astype(cls.np_data_type).tobytes(),
91-
**payload,
92-
**geopoints,
93-
},
89+
"vector",
90+
np.array(vec).astype(cls.np_data_type).tobytes()
91+
# mapping={
92+
# "vector": np.array(vec).astype(cls.np_data_type).tobytes(),
93+
# **payload,
94+
# **geopoints,
95+
# },
9496
)
9597
#p.execute()
9698

0 commit comments

Comments
 (0)