现象(2026-09-15 实测,线上)
把词表归一落地后复核 domain 过滤,发现传已退役/不存在的域值同样会带回 FAQ 条目:
domain=meta -> 5 命中(课程,domain=meta)✅
domain=audio -> 5 命中(课程,domain=audio)✅
domain=contrib -> 2 命中,全是 FAQ(faq-issue-1364 / faq-issue-1362)⚠️
domain=ops -> 同上(ops 已退役、语料里 0 篇)⚠️
原因
课程命中先经 searchLessonsBM25(..., domain, ...) 过滤、再过 applyDetailLevel;而 FAQ 命中是在
这之后由独立路径追加的(workers/register-proxy-sw.js:课程结果约 1550 行、FAQ 追加约 1560 行),
matchAnsweredQuestions() 不接收 domain 参数。
影响
调用方按 domain 收窄检索时会拿到不属于该 domain 的 FAQ 条目 —— 轻则噪声,重则让人以为
contrib 这类已退役的值仍然存在(今天就是这么被发现的)。
建议修法
把 domain 传给 matchAnsweredQuestions() 并在其中过滤(FAQ 行有 domain 字段可用),
或者明确文档化「domain 只过滤课程」。测试可加在 workers/mcp-search-relevance.test.mjs:
带 domain 的查询不得返回 domain 不匹配的 FAQ 条目。
关联:#1687(词表归一)复核时发现。FAQ 与 domain 的关系此前从未定义,不是这次的回归。
This repo is using Opire - what does it mean? 👇
💵 Everyone can add rewards for this issue commenting /reward 100 (replace 100 with the amount).
🕵️♂️ If someone starts working on this issue to earn the rewards, they can comment /try to let everyone know!
🙌 And when they open the PR, they can comment /claim #1743 either in the PR description or in a PR's comment.
🪙 Also, everyone can tip any user commenting /tip 20 @Ikalus1988 (replace 20 with the amount, and @Ikalus1988 with the user to tip).
📖 If you want to learn more, check out our documentation.
现象(2026-09-15 实测,线上)
把词表归一落地后复核
domain过滤,发现传已退役/不存在的域值同样会带回 FAQ 条目:原因
课程命中先经
searchLessonsBM25(..., domain, ...)过滤、再过applyDetailLevel;而 FAQ 命中是在这之后由独立路径追加的(
workers/register-proxy-sw.js:课程结果约 1550 行、FAQ 追加约 1560 行),matchAnsweredQuestions()不接收domain参数。影响
调用方按 domain 收窄检索时会拿到不属于该 domain 的 FAQ 条目 —— 轻则噪声,重则让人以为
contrib这类已退役的值仍然存在(今天就是这么被发现的)。建议修法
把
domain传给matchAnsweredQuestions()并在其中过滤(FAQ 行有 domain 字段可用),或者明确文档化「domain 只过滤课程」。测试可加在
workers/mcp-search-relevance.test.mjs:带
domain的查询不得返回 domain 不匹配的 FAQ 条目。This repo is using Opire - what does it mean? 👇
💵 Everyone can add rewards for this issue commenting
/reward 100(replace100with the amount).🕵️♂️ If someone starts working on this issue to earn the rewards, they can comment
/tryto let everyone know!🙌 And when they open the PR, they can comment
/claim #1743either in the PR description or in a PR's comment.🪙 Also, everyone can tip any user commenting
/tip 20 @Ikalus1988(replace20with the amount, and@Ikalus1988with the user to tip).📖 If you want to learn more, check out our documentation.