From aa70b381bfe58ff60f1e10ddfa48e2012e8f4ef0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timeless=E5=B0=8F=E5=B8=85?= <1018008088@qq.com> Date: Thu, 8 Oct 2026 13:35:57 +0800 Subject: [PATCH] searxng-search: default engines bing,yandex instead of bing,360search MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The default was chosen by a single Chinese test query and generalized from it. Measuring both a Chinese and an English technical query shows it was inverted on both counts. Results mentioning "opencode", out of returned: zh "OpenCode V2 和 V1 区别" en "opencode v2 migrate from v1 plugin api" bing 10/10 missed the doc entirely 360search 0/5 4, unrelated (sohu/toutiao) yandex 14/15 15, migration doc ranked #1 naver 0/9 15, migration doc ranked #1 yandex had been excluded on the claim that it "has almost no Chinese index". Measured, it has the best Chinese relevance of any engine here, and on the English query the V1->V2 migration doc is its first result -- the exact document that the old default could not find at all. 360search had been the default. It is the worst engine on both query types. It splits the query on "V1"/"V2" and answers with Android and CANN version-difference articles, which produced the 10-of-15 noise in the first round of testing. naver is left out rather than added: strongest on English, 0/9 on Chinese, so including it would trade one kind of noise for another. It is documented as worth passing explicitly for English lookups. The comment above the constant now carries the measurement table, so the default can be re-chosen from data instead of re-derived from a hunch. Not changed, and worth knowing: cn.bing.com ignores the site: operator. engines=bing&q=site:opencode.ai+v2+migration returns 0 results from opencode.ai, while the same query without site: returns 3. Site-restricted search is not available through this instance. Unreproduced: one run of the Chinese query returned entirely unrelated results from bing (Doubao, Zhipin, Zhihu) while four other runs with the same parameters returned 10/10 relevant. No parameter difference was found between the good and bad runs. Treated as transient upstream behaviour, not a plugin bug, and not documented as a rule. README engine table updated to the measured numbers. --- plugins/searxng-search/README.md | 10 ++++++---- plugins/searxng-search/index.ts | 26 +++++++++++++++++++++----- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/plugins/searxng-search/README.md b/plugins/searxng-search/README.md index 90c3083..cdbb4a8 100644 --- a/plugins/searxng-search/README.md +++ b/plugins/searxng-search/README.md @@ -115,8 +115,8 @@ Both are handled, both are worth understanding because they fail silently. **1. `categories` is additive, not a filter.** If you pass both `engines` and `category`, SearXNG takes the union: the named engines *plus* every engine -enabled by default in that category. A careful `engines=bing,360search` becomes -`bing,360search` + whatever the category contributes. The plugin therefore +enabled by default in that category. A careful `engines=bing,yandex` becomes +`bing,yandex` + whatever the category contributes. The plugin therefore sends `categories` only when the caller explicitly asked for a category, never alongside an engine list it chose itself. @@ -156,8 +156,10 @@ SearXNG 2026.10.7-6671d89be, `docker.io/searxng/searxng:latest` (built | Engine | Status | | --- | --- | | `bing` | Active. Needs `base_url: https://cn.bing.com`; `www.bing.com` blocks scraping from this network. | -| `360search` | Active. | -| `yandex`, `naver` | Active and reachable, but no useful Chinese index — left out of the plugin's default engine list. | +| `yandex` | Active. Best measured relevance here on both Chinese and English technical queries; first result for a V1→V2 migration query is the migration doc itself. Default. | +| `bing` | Active, but needs `base_url: https://cn.bing.com`; `www.bing.com` blocks scraping from this network. Default. Supports neither paging nor `time_range`. | +| `naver` | Active and strongest on English, but 0/9 relevant on a Chinese query, so it is left out of the defaults rather than allowed to dilute them. Pass `engines=naver` explicitly for English lookups. | +| `360search` | Active, and the **worst** engine on both query types: 0/5 relevant on a Chinese query, where it splits on "V1"/"V2" and returns Android and CANN version-difference articles. Removed from the defaults. | | `baidu` | Disabled. Answers with a CAPTCHA and suspends the client IP for an hour. | | `sogou` | Disabled. The upstream engine raises `AttributeError` in this release. | | `mojeek`, `ecosia`, `marginalia` | Dropped by `keep_only`; not reachable from this network. | diff --git a/plugins/searxng-search/index.ts b/plugins/searxng-search/index.ts index 5c7766a..5552a3a 100644 --- a/plugins/searxng-search/index.ts +++ b/plugins/searxng-search/index.ts @@ -24,11 +24,27 @@ interface PluginConfig { const DEFAULT_BASE_URL = process.env.SEARXNG_URL ?? "http://127.0.0.1:39217" -// Engines verified reachable from this network. yandex and naver were removed on -// purpose: they have almost no Chinese index, so on a Chinese query they return -// unrelated pages that pollute the merged result list. baidu is left out because -// it answers with a CAPTCHA and suspends the client IP for an hour. -const DEFAULT_ENGINES = "bing,360search" +// Engine default, chosen by measuring relevance on this network rather than by +// assuming an engine's index is uniform. Same two queries, results mentioning +// "opencode" out of returned: +// +// zh "OpenCode V2 和 V1 区别" en "opencode v2 migrate from v1 plugin api" +// bing 10/10 missed the doc entirely +// 360search 0/5 4, unrelated (sohu/toutiao) +// yandex 14/15 15, migration doc ranked #1 +// naver 0/9 15, migration doc ranked #1 +// +// yandex was previously excluded on the assumption that it has "no Chinese +// index". Measured, it has the best Chinese relevance of any engine here and +// the best English relevance for technical queries. 360search was previously +// the default and is the worst on both: it splits the query on "V1"/"V2" and +// answers with Android and CANN version-difference articles, which is where +// the first round of noise in this plugin's history came from. +// +// naver is strong on English but returns 0/9 on Chinese, so it is left out +// rather than allowed to dilute Chinese queries. baidu stays out entirely: it +// answers with a CAPTCHA and suspends the client IP for an hour. +const DEFAULT_ENGINES = "bing,yandex" const DEFAULT_TIMEOUT_MS = 20_000 const DEFAULT_MAX_SNIPPET = 300