browser-search icon indicating copy to clipboard operation
browser-search copied to clipboard

searxng.mjs: keep pubdate, image/video fields and unresponsive engines; honor SEARXNG_URL; add timeout

Open Johell1NS opened this issue 1 month ago • 1 comments

After upgrading SearXNG to 2026.10.19, scripts/searxng/searxng.mjs drops useful data and has a few robustness gaps.

Data lost

  • Many engines now fill only pubdate, not publishedDate. On a news query about 70% of results (79/108 in a test) have pubdate, but the script only read publishedDate, so most dates came out null. It now falls back to pubdate.
  • Image results lose img_src, thumbnail_src and resolution; video results (new result type) lose length, iframe_src, thumbnail and author. These are now returned when present.
  • unresponsive_engines was discarded, so an agent could not tell that Google, DuckDuckGo, Startpage, Qwant, etc. were blocked and that results were partial. It is now returned, together with suggestions, corrections, answers and compact infoboxes.
  • engines is returned when more than one engine agrees on a result.
  • All previous keys are unchanged; new fields only appear when non-empty.

Robustness

  • The base URL was hard-coded to http://localhost:8080 and ignored SEARXNG_URL (which check.sh already uses). It now honours SEARXNG_URL (default http://127.0.0.1:8080).
  • Requests had no timeout. Added SEARXNG_TIMEOUT_MS (default 30000); a timeout is reported as an error and does not trigger a container restart.
  • The automatic container restart is skipped when SEARXNG_URL is set, since the script cannot know which container serves a custom URL.
  • docker inspect --format now uses double quotes so it works in cmd.exe as well.

Docs updated in SKILL.md (output format) and data/advanced-browsing-reference.md (new variables).

Johell1NS avatar Oct 21 '26 10:10 Johell1NS

Released in v3.2.0.

Johell1NS avatar Oct 21 '26 12:10 Johell1NS