Repository navigation
fix(research): SearXNG searches keep the owner's recency window - #96
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hunt finding toolgate-4 F3 (re-verified on main, research_web.py:99): SearXNG got
time_range=monthfor 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_rangepicks the narrowest SearXNG window (day/week/month/year) that coversrecency_days._older_thandrops rows whose publication date falls before the cutoff. The Reddit Atom and App Store paths already did this.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.