Skip to content

Commit 1499bfb

Browse files
simplifies drop_keys method
1 parent 45c5e9f commit 1499bfb

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

redisvl/index/index.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -503,10 +503,7 @@ def drop_keys(self, keys: Union[str, List[str]]) -> None:
503503
keys (Union[str, List[str]]): The document ID or IDs to remove from the index.
504504
"""
505505
if isinstance(keys, List):
506-
with self._redis_client.pipeline(transaction=False) as pipe: # type: ignore
507-
for key in keys: # type: ignore
508-
pipe.delete(key)
509-
pipe.execute()
506+
self._redis_client.delete(*keys) # type: ignore
510507
else:
511508
self._redis_client.delete(keys) # type: ignore
512509

0 commit comments

Comments
 (0)