支持限定公开来源与排除文字的 Telegram 搜索 #2
Reference in New Issue
Block a user
Delete Branch "codex/query-refinements"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
目标
在 Bot、离线命令行和核心查询入口按公开来源及排除文字缩小搜索结果。
行为
关键词前可加入 from:@username 和一个或多个 exclude:片段。沿用现有倒排索引与查询快照,在计数、排序和分页前按用户名及规范化标题和正文过滤。type:video 等现有类型筛选仍放在最前。需要至少一个正向检索词。排除片段按子串匹配,来源按文档已记录的公开用户名匹配。
验证
本机 cargo test --workspace --locked --offline 通过 18 个常规测试。新增覆盖来源、多个排除片段、无效语法、分页、媒体与引号短语组合。cargo fmt 与 git diff 空白检查通过。使用合成输入,无线上 Telegram 联调。