Skip to content

feat: OCR 图片文字搜索集成 #89

@NotSleeply

Description

@NotSleeply

功能描述

将 OCR 识别的文字纳入搜索范围,让用户能通过文字搜索找到包含对应文字的图片剪贴板记录。

背景

v0.17.0 已实现 OCR 服务(Tesseract),但搜索功能仅搜索剪贴板条目的 content 字段。图片条目的 OCR 文字存储在 ocr_text 字段,未被搜索覆盖。

实现要点

  • 修改搜索逻辑:搜索时同时匹配 ocr_text 字段
  • 搜索结果显示时标注「OCR 匹配」
  • 设置中添加 OCR 搜索开关
  • 搜索面板显示 OCR 识别的文字摘要

技术方案

  • database.js: 修改 search/semanticSearch 方法,JOIN ocr_text
  • app.js: 搜索结果中展示 OCR 匹配标记
  • index.html: 搜索结果 UI 适配

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions