search_graph: clarify how to find a known symbol without specifying its label

未关闭 适合新手
#3,131 1 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
1/5
预计耗时
1-3 小时
新手友好度
82/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
活跃
技术栈
typescript
领域
devtools

调研方向

找到 search_graph 工具描述及其文档,然后阐明 BM25 query 搜索与 name_pattern 查找之间的区别。说明未标注的 BM25 搜索会排除 Variable 节点,并且字面名称应使用经过转义且带锚点的模式。工具描述和文档都解释这些行为后,即为完成;issue 指出 E2E 测试已经验证了结构搜索。

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

描述

documentation enhancement parsing/quality ux/behavior
What problem does this solve?

The current search_graph tool description does not clearly explain when to use query versus name_pattern.

For example, given an indexed TypeScript declaration:

export const nativeScaleRefreshMarker = 913;

The following BM25 search does not return the declaration:

{
  "project": "<project>",
  "query": "nativeScaleRefreshMarker",
  "limit": 6,
  "format": "json"
}

This is intentional. BM25_UNLABELLED_EXCLUSION excludes Variable, File, Folder and Project nodes to prevent path matches from crowding out other definitions.

However, clients can already find a known symbol without knowing its label by using an anchored name_pattern and omitting query:

{
  "project": "<project>",
  "name_pattern": "^nativeScaleRefreshMarker$",
  "limit": 6,
  "format": "json"
}
Proposed solution

Update the search_graph tool description and documentation to explain that:

  • query uses BM25 full-text search. Without a label filter, Variable nodes are excluded.
  • name_pattern can locate known symbols without requiring their node label.
  • For literal symbol names, clients should escape regex metacharacters and use anchored patterns.

No changes to BM25 ranking, candidate selection or the database schema are needed.

Verification

A native E2E test confirmed that structural search finds both variable declarations in a repository containing 2,105 competing functions, without specifying a label or changing BM25 behavior.

Confirmations
  • I searched existing issues and this is not a duplicate.
主要语言
C
星标
45.8k
派生
3.8k
平均合并
2 天 18 小时
30 天内合并 PR
108

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

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

DeusData/codebase-memory-mcp 的其他 Issue

查看 DeusData/codebase-memory-mcp 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

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