P0 (1项): - keyset cursor: lit.title or "__NULL__" 空字符串误判为NULL导致后续翻页全空 P1 (6项): - boolean_operator: 仅扫描depth=0的token,括号内AND/OR不再影响顶层操作符判定 - is_pubmed_syntax: 去除AND/OR/NOT检测的IGNORECASE(PubMed仅识别大写布尔符) - _relevance_query: MeSH-only查询(如breast[MAJR])补充原始回退,避免退化到日期排序 - pmid_terms: 缺少try/except int(),补充ValueError+DOI兜底 - 部分日期展开: 2024-01[DP]等YYYY-MM partial date展开为整月范围(DP/EDAT/CRDT) - 前端#N去重: resolveQuery/expandQuery dedup refs防重复引用误判为循环 P2 (9项): - cache: filter-options加入invalidate_search_cache清理 - worker: daily_ftp_update/daily_citation_update异常时finally保证缓存清理 - cursor_val: 空字符串''通过is None检查,补充not cursor_val - keyset UI: 模板条件sort==='date'改为KEYSET_SORTS.has(sort) - resetAllFilters: 补充showCustomYear=false
CRITICAL: - invalidate_search_cache 清理 atm:* 缓存(MeSH ATM扩展不再用过期结果) - Pro 方案 api_quota_per_day 1000→10000(修复低于 Free 的数据错误) - CacheService/RateLimitMiddleware Redis 连接失败60秒自动重试(原永久降级) - 普通搜索中文输入自动匹配 GlobalTag.name_zh(如"肺癌"通过MeSH标签关联文献) - AdvancedPubSearchView resolveQuery 添加 seen Set 检测交替 #N 循环引用 HIGH: - 限速器 _burst_windows 每500请求清理过期条目(防止内存泄漏) - cron daily_ftp_update 末尾调用 invalidate_search_cache()(自动管道不再用过期缓存) MEDIUM: - _apply_order_by ASC 排序加 id tiebreaker(title/journal/first_author翻页跳行/重复) - _keyset_condition 所有 is_(None) 加 id tiebreaker + __NULL__ 哨兵值 - _field_condition("all") 默认tsvector路径加 journal/journal_iso ILIKE 兜底 - SearchView restoreFromQuery date_preset/year_from/year_to 优先顺序修复 docs: 更新 12/13 搜索文档,移除 CLAUDE.md 陈旧 SQLite 提及
Includes search engine improvements, Alembic migrations, new services (pubmed_daily_update, query_expansion), frontend updates, and documentation sync.