diff --git a/backend/app/api/articles.py b/backend/app/api/articles.py index 5eb6d38..1799c4d 100644 --- a/backend/app/api/articles.py +++ b/backend/app/api/articles.py @@ -43,8 +43,10 @@ async def list_articles( # 公共筛选条件(用于 list + count) filters = [Article.duplicate_of.is_(None)] - # 默认过去 24h - if since is None and until is None: + # 默认过去 24h — 但**搜索时(q 不为空)不限时间**,搜全量历史 + # (用户的搜索意图是"找到含某关键字的文章",跟时间无关; + # 想限定时间显式传 since/until) + if not q and since is None and until is None: since = _default_since_24h() if since: