Skip to content

fix(internal/db/searchnode): fix index update path - #3128

Merged
jyxjjj merged 1 commit into
mainfrom
fix/auto-index
Sep 24, 2026
Merged

jyxjjj merged 1 commit into
mainfrom
fix/auto-index

Conversation

@ILoveScratch2

Copy link
Copy Markdown
Member

Summary / 摘要

修复由于 Path 分割问题导致自动删除索引失败的问题

  • This PR has breaking changes.
    / 此 PR 包含破坏性变更。
  • This PR changes public API, config, storage format, or migration behavior.
    / 此 PR 修改了公开 API、配置、存储格式或迁移行为。
  • This PR requires corresponding changes in related repositories.
    / 此 PR 需要关联仓库同步修改。

Related repository PRs / 关联仓库 PR:

  • OpenList-Frontend:
  • OpenList-Docs:

Related Issues / 关联 Issue

Fixes #2881

Testing / 测试

  • go test ./...
  • Manual test / 手动测试:

Checklist / 检查清单

  • I have read CONTRIBUTING.
    / 我已阅读 CONTRIBUTING。
  • I confirm this contribution follows the repository license, contribution policy, and code of conduct.
    / 我确认此贡献符合仓库许可证、贡献规范和行为准则。
  • I have formatted the changed code with gofmt, go fmt, or prettier where applicable.
    / 我已按适用情况使用 gofmt、go fmt 或 prettier 格式化变更代码。
  • I have requested review from relevant maintainers or code owners where applicable.
    / 我已在适用情况下请求相关维护者或代码所有者审查。

@ILoveScratch2 ILoveScratch2 changed the title fix(searchnode): fix index update path fix(internal/db/searchnode): fix index update path Sep 24, 2026
@ILoveScratch2
ILoveScratch2 requested a lite review from Copilot September 24, 2026 09:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

No unresolved review issues were identified.

Review effort: Lite
Findings: None

What changed in this PR

Fixes database search-index deletion for nested paths by correctly splitting cleaned paths into parent and basename.

Changes:

  • Replaces path.Split with path.Dir and path.Base.
  • Ensures stale file index records match stored parent paths.
File Description
internal/​db/​searchnode.go Corrects parent/name extraction during index deletion.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@jyxjjj
jyxjjj merged commit 54ae9d7 into main Sep 24, 2026
14 checks passed
@jyxjjj
jyxjjj deleted the fix/auto-index branch September 24, 2026 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] 数据库搜索索引无法删除已不存在的文件,刷新目录后仍能搜索到

3 participants