pub struct SearchConfig {
pub enabled: bool,
pub searxng_url: Option<String>,
pub timeout_ms: u64,
pub default_limit: u32,
pub max_limit: u32,
pub research_engines: Vec<String>,
pub github_engines: Vec<String>,
}Expand description
Configuration for the /v1/search endpoint and its SearXNG backend.
When searxng_url is unset the endpoint returns HTTP 503 with
error_code: "search_disabled" — the route remains mounted so that
startup doesn’t have to know whether search will ever be configured.
Fields§
§enabled: boolMaster switch. Defaults to true; set to false to refuse all
/v1/search requests even if searxng_url is configured.
searxng_url: Option<String>Base URL of the SearXNG instance (e.g. http://searxng:8080).
None (the default) disables the endpoint with a clear error.
timeout_ms: u64End-to-end timeout for the SearXNG call in milliseconds.
default_limit: u32Default limit when the request omits it.
max_limit: u32Hard cap on limit per request. SaaS uses 20.
research_engines: Vec<String>SearXNG engines invoked when the request includes categories: ["research"].
Defaults match the SaaS implementation.
github_engines: Vec<String>SearXNG engines invoked when the request includes categories: ["github"].
Trait Implementations§
Source§impl Clone for SearchConfig
impl Clone for SearchConfig
Source§fn clone(&self) -> SearchConfig
fn clone(&self) -> SearchConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more