DOC-FULL-018A P1 | PDF / EPUB SearchResult 扩展 【status:todo】 #86

Closed
opened 2026-06-07 11:45:18 +08:00 by wangdl · 2 comments
Owner

扩展 SearchResult{target_type, page_number?, chapter_id?}。SearchTargetType: MarkdownBlock|TextLine|PdfPage|EpubChapter。search_pdf/search_epub 接口。SearchResult→NoteAnchor 映射。

M-DOC-FULL v2 里程碑 issue。

## 扩展 SearchResult{target_type, page_number?, chapter_id?}。SearchTargetType: MarkdownBlock|TextLine|PdfPage|EpubChapter。search_pdf/search_epub 接口。SearchResult→NoteAnchor 映射。 M-DOC-FULL v2 里程碑 issue。
wangdl added this to the M-DOC-FULL:Document Runtime 完整阅读内核与学习事件协议 milestone 2026-06-07 11:45:18 +08:00
wangdl changed title from DOC-FULL-018A P1 | PDF / EPUB SearchResult 扩展 to DOC-FULL-018A P1 | PDF / EPUB SearchResult 扩展 【status:todo】 2026-06-07 19:15:09 +08:00
Author
Owner

审查结论:document runtime 当前有文件类型识别/MaterialType/PreviewMode/DocumentInfo(基本)/Markdown解析/Text解析/ImageMeta/Search(V1 Markdown+Text)/NoteAnchor(V1)/ReadingEvent(V1)/ReadingPosition(V1)/EventBuffer(V1基础)/iOS构建/UniFFI绑定/docs。但 V2 核心模型(ReadingSession/EventV2/ActiveTimeTracker)不存在,EventBuffer 缺 ack/failed,Position 缺 camelCase+clamp,PDF/EPUB/Office 为 stub,测试覆盖不足 V2。

本 Issue: PDF/EPUB search 不存在。blocked-by:pdf-epub-stub

状态: status:todo
工作类型: work:extend-existing

## 审查结论:document runtime 当前有文件类型识别/MaterialType/PreviewMode/DocumentInfo(基本)/Markdown解析/Text解析/ImageMeta/Search(V1 Markdown+Text)/NoteAnchor(V1)/ReadingEvent(V1)/ReadingPosition(V1)/EventBuffer(V1基础)/iOS构建/UniFFI绑定/docs。但 V2 核心模型(ReadingSession/EventV2/ActiveTimeTracker)不存在,EventBuffer 缺 ack/failed,Position 缺 camelCase+clamp,PDF/EPUB/Office 为 stub,测试覆盖不足 V2。 **本 Issue**: PDF/EPUB search 不存在。blocked-by:pdf-epub-stub **状态**: status:todo **工作类型**: work:extend-existing
Author
Owner

验收完成(已于 #67 实现 + #68/#69 补充)

验收内容

  • SearchResult 字段扩展:page_number?: u32 + chapter_id?: String(#67 search.rs:11-12)
  • PDF 搜索:search_pdf_text(pages: &[(u32, &str)], query: &str)(#67 search.rs:110)
  • EPUB 搜索:search_epub_chapters(chapters: &[(String, &str)], query: &str)(#67 search.rs:153)
  • SearchResult→NoteAnchor 映射:from_search_result()(#68 anchors.rs:101)

已有测试

  • test_search_pdf_text_* (4 tests) + test_search_epub_chapters_* (4 tests)
  • test_from_search_result_markdown/pdf/epub (3 tests)
  • test_to_position_from_search_result_pdf/markdown (2 tests)

验证

cargo test search anchors — 56 passed
## 验收完成(已于 #67 实现 + #68/#69 补充) ### 验收内容 - [x] SearchResult 字段扩展:`page_number?: u32` + `chapter_id?: String`(#67 search.rs:11-12) - [x] PDF 搜索:`search_pdf_text(pages: &[(u32, &str)], query: &str)`(#67 search.rs:110) - [x] EPUB 搜索:`search_epub_chapters(chapters: &[(String, &str)], query: &str)`(#67 search.rs:153) - [x] SearchResult→NoteAnchor 映射:`from_search_result()`(#68 anchors.rs:101) ### 已有测试 - `test_search_pdf_text_*` (4 tests) + `test_search_epub_chapters_*` (4 tests) - `test_from_search_result_markdown/pdf/epub` (3 tests) - `test_to_position_from_search_result_pdf/markdown` (2 tests) ### 验证 ``` cargo test search anchors — 56 passed ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wangdl/zhixi-document-runtime#86
No description provided.