Repository navigation
feat(algolia): 生成 easyops 格式 search-index.json 并覆盖上传 OSS - #10
Merged
Merged
Conversation
Algolia 迁移后本仓停用了 easyops 本地搜索插件,不再生成 search-index.json;OSS ossutil cp -r --update 只增不删,导致 8 月过期 索引残留,MCP 静默读到旧数据。 与 rdk_x_doc / rdk_s_doc / accessories_bmi088_doc 同方案: - algolia-index.mjs 新增 buildEasyopsIndex(),爬取后生成 easyops 五分片 search-index.json(pages/headings/pageSnippets/contentSnippets,仅 zh-Hans) - workflow 新增 ossutil 单文件覆盖上传(不带 -r/--update),覆盖根下同名 文件以清除过期产物 Co-Authored-By: Claude Code <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
Algolia 迁移后本仓停用了 easyops 本地搜索插件,不再生成
search-index.json。OSSossutil cp -r --update只增不删,导致 8 月过期索引残留,MCP 静默读到旧数据。与 rdk_x_doc / rdk_s_doc / accessories_bmi088_doc 同方案。
改动
scripts/algolia-index.mjs:新增buildEasyopsIndex(),爬取完成后生成 easyops 五分片search-index.json(pages / headings / pageSnippets / contentSnippets,仅 zh-Hans).github/workflows/algolia-index.yml:新增 ossutil 单文件覆盖上传(不带-r/--update),覆盖根下同名search-index.json以清除过期产物验证
ALGOLIA_ADMIN_API_KEY=dummy npm run algolia:index -- --dry-run爬取线上 38 页,生成 18 pages / 88 headings / 96 content snippets,MCP parser 往返解析 219 条记录无异常🤖 Generated with Claude Code