DOC-FULL-018 P0 | SearchResult 模型与搜索接口统一 【status:partial】 #67
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
SearchResult{target_type, block_id?, line_number?, page_number?, chapter_id?, snippet, match_start, match_end},支持 Markdown/Text/PDF/EPUB 搜索
M-DOC-FULL 里程碑 issue。详见设计文档。
DOC-FULL-018 P0 | SearchResult 模型与搜索接口统一to DOC-FULL-018 P0 | SearchResult 模型与搜索接口统一 【status:partial】审查结论: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: search.rs 存在。Markdown/Text 搜索完成。PDF/EPUB 搜索不存在(模块为 stub)。SearchResult 缺 target_type/page_number/chapter_id。
状态: status:partial
工作类型: work:extend-existing
完成报告
改动文件
crates/zx_document_core/src/search.rs— SearchResult 新增page_number: Option<u32>+chapter_id: Option<String>字段,新增search_pdf_text()和search_epub_chapters()函数crates/zx_document_ffi/src/lib.rs— 新增search_pdf_pages/search_epub_chapters_ffiuniffi 导出 + C-ABI 包装crates/zx_document_ffi/src/zx_document.udl— 更新 namespace + SearchResult 字典测试覆盖(11 个新增)
test_search_pdf_text_basic/test_search_pdf_text_multiple_pages/test_search_pdf_text_no_match/test_search_pdf_text_empty_querytest_search_epub_chapters_basic/test_search_epub_chapters_multiple/test_search_epub_chapters_no_match/test_search_epub_chapters_empty_querytest_search_result_new_fields_serde/test_search_result_pdf_fields_serde/test_search_result_epub_fields_serde代码证据
验证