Skip to content

fix(research): SearXNG searches keep the owner's recency window - #96

Merged
alexeybe1kin merged 1 commit into
mainfrom
fix/searx-recency
Nov 13, 2026
Merged

alexeybe1kin merged 1 commit into
mainfrom
fix/searx-recency

Conversation

@alexeybe1kin

Copy link
Copy Markdown
Collaborator

Hunt finding toolgate-4 F3 (re-verified on main, research_web.py:99): SearXNG got time_range=month for anything from 2 to 45 days and no filter from 46 days on, and its rows were never checked against the cutoff. A "last 7 days" search returned month-old rows without notice. SearXNG is the only working provider for "general" and the fallback for six sources.

Change:

  • _searx_time_range picks the narrowest SearXNG window (day/week/month/year) that covers recency_days.
  • _older_than drops rows whose publication date falls before the cutoff. The Reddit Atom and App Store paths already did this.
  • Undated rows are kept; SearXNG often has no date.

Tests: toolgate/tests/test_searx_recency.py. The window mapping, plus a 7-day search that keeps a 2-day-old row and an undated row and drops a 20-day-old one. All fail on main and pass here. Every research test file: 527 passed. Ruff ok.

Not in this PR: toolgate-4 F5 (per-provider time slices), which needs a deadline threaded through each provider.

2..45 days all mapped to time_range=month and 46+ sent no filter, and rows were never checked
against the cutoff, so a "last 7 days" search returned month-old rows (toolgate-4 F3). The
window is now the narrowest of day/week/month/year that covers the request, and rows dated
before the cutoff are dropped; undated rows stay.
@alexeybe1kin
alexeybe1kin merged commit 9a4b959 into main Nov 13, 2026
4 checks passed
@alexeybe1kin
alexeybe1kin deleted the fix/searx-recency branch November 13, 2026 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant