产品决定:搜索建议只展示 ts_stat 高频词续接(如'美'→美国/美军/美国政府), 不要真实文章 id 提示(用户认为这种'文章#566871'是噪音,没连续性)。 改动: - SearchSuggestionsResponse 去 title,只剩 query + keywords - SearchService 只查 search_keywords,fallback 路径也只针对 keywords - Feed.vue: 删掉 suggestTitles 状态 + SuggestTitleOption 类型联合, renderSuggestion 简化成 '词' 标签 + 词文本 + 右侧 weight 数字 - 0011 迁移: 删 search_title_suggestions 表 + 3 索引 + trigger + 函数 (trigger 在每篇文章 INSERT/UPDATE 都会跑,删了能省掉无用性能损耗) - 删除: app/models/search_title_suggestion.py + backfill_search_suggestions.py 替换成: app/scripts/refresh_search_keywords.py(只跑一次词频刷新)
28 lines
824 B
Python
28 lines
824 B
Python
"""所有 ORM 模型。
|
|
|
|
新模型请在这里 import,确保 Alembic 自动发现。
|
|
"""
|
|
from app.models.api_token import ApiToken # noqa: F401
|
|
from app.models.article import Article # noqa: F401
|
|
from app.models.article_read import ArticleRead # noqa: F401
|
|
from app.models.bookmark import Bookmark # noqa: F401
|
|
from app.models.llm_setting import LlmSetting # noqa: F401
|
|
from app.models.search_keyword import SearchKeyword # noqa: F401
|
|
from app.models.source import Source, SourceKind # noqa: F401
|
|
from app.models.subscription import Subscription # noqa: F401
|
|
from app.models.user import User, UserRole # noqa: F401
|
|
|
|
__all__ = [
|
|
"ApiToken",
|
|
"Article",
|
|
"ArticleRead",
|
|
"Bookmark",
|
|
"LlmSetting",
|
|
"SearchKeyword",
|
|
"Source",
|
|
"SourceKind",
|
|
"Subscription",
|
|
"User",
|
|
"UserRole",
|
|
]
|