Add delete_where() API for bulk index deletion by filter
维护者通常 5 天内回复
还没有人认领这个 Issue。
- #683 来自 @Aryan-Pardeshi —— 已关闭,未合并
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 58/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- python, redis
调研方向
首先定位现有的 clear()、drop_documents()、drop_keys() 和 _delete_batch() 入口点,包括它们对应的异步版本。先运行删除行为的集成测试,然后覆盖独立客户端和集群客户端的选择性匹配、无操作匹配以及完全清除。完成的标准是两个新 API 都能正常工作,clear() 共享删除内部逻辑,并且文档包含一个使用示例。
由索引模型根据 Issue 内容生成。
描述
Summary
Add delete_where() / adelete_where() to delete index documents by filter expression, and refactor clear() to share the same internals.
Level: Intermediate
Current State
clear()deletes all documents via batchedFilterQuery("*")flow.drop_documents()/drop_keys()only delete known IDs/keys.- There is no public API to delete a filtered subset of index documents.
Proposed Change
- Add:
delete_where(filter_expression, batch_size=500) -> intadelete_where(filter_expression, batch_size=500) -> int
- Refactor both
clear()anddelete_where()to use shared private internals:- common batch-ID fetch loop
- existing
_delete_batch()and async equivalent as delete primitive
- Implement
clear()asdelete_where(FilterExpression("*")).
Definition of Done
- Filtered bulk deletion works on standalone and cluster clients.
clear()delegates to the shared deletion internals (no duplicated batch loop).- Integration tests cover selective match, no-op match, and full-clear behavior.
- Docs include one usage example.
Out of Scope
- Hard-delete audit logging or soft-delete support.
- 主要语言
- Python
- 星标
- 431
- 派生
- 107
- 平均合并
- 5 天 17 小时
- 30 天内合并 PR
- 16
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
redis/redis-vl-python 的其他 Issue
-
exists() depends on exact FT.INFO error wording; an unrecognised "missing index" message makes create() never create the index (regression from #672)可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
redis/redis-vl-python#773 ·
维护者通常 5 天内回复
-
Vector field with index_missing=True cannot be created可能已有人在做 @RaphaelFakhri 于 3 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
redis/redis-vl-python#770 ·
维护者通常 5 天内回复
-
Add Python 3.15 support可能已有人在做 @vishal-bala 于 4 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 65/100
redis/redis-vl-python#757 · 1 条评论 · 1 个 reaction ·
维护者通常 5 天内回复
-
SearchIndex.drop_keys does not validate cluster hash-tag co-location (inconsistent with drop_documents)可能已有人在做 @Hashim1999164 于 2 天前认领。 未关闭bug good first issue index
难度 2/5 1-3 小时 新手友好度 78/100
redis/redis-vl-python#601 ·
维护者通常 5 天内回复
-
documentation
难度 1/5 1 小时以内 新手友好度 62/100
redis/redis-vl-python#300 ·
维护者通常 5 天内回复
查看 redis/redis-vl-python 的全部 Issue
相似的 Issue
-
documentation
难度 2/5 1-3 小时 新手友好度 67/100
维护者通常 1 天内回复
-
good first issue module-baseline needs triage ux
难度 2/5 1-3 小时 新手友好度 82/100
darnitdevorg/darnit#650 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
nyjc-computing/campus#938 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
nf-osi/nf-metadata-dictionary#1027 ·
维护者通常 1 天内回复
-
bug documentation
难度 1/5 1 小时以内 新手友好度 92/100
qatrackplus/qatrackplus#913 ·
维护者通常 3 天内回复