Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Add delete_where() API for bulk index deletion by filter

未关闭
#488 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 5 天内回复

还没有人认领这个 Issue。

  • #683 来自 @Aryan-Pardeshi —— 已关闭,未合并

评估

难度
4/5
预计耗时
3-5 天
新手友好度
58/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
技术栈
python, redis

调研方向

首先定位现有的 clear()、drop_documents()、drop_keys() 和 _delete_batch() 入口点,包括它们对应的异步版本。先运行删除行为的集成测试,然后覆盖独立客户端和集群客户端的选择性匹配、无操作匹配以及完全清除。完成的标准是两个新 API 都能正常工作,clear() 共享删除内部逻辑,并且文档包含一个使用示例。

由索引模型根据 Issue 内容生成。

描述

enhancement

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 batched FilterQuery("*") 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) -> int
    • adelete_where(filter_expression, batch_size=500) -> int
  • Refactor both clear() and delete_where() to use shared private internals:
    • common batch-ID fetch loop
    • existing _delete_batch() and async equivalent as delete primitive
  • Implement clear() as delete_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 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

redis/redis-vl-python 的其他 Issue

查看 redis/redis-vl-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。