pub struct ServerConfig {Show 17 fields
pub max_download_mb: u32,
pub max_result_length: usize,
pub search_timeout: u64,
pub oversampling_factor: u32,
pub auto_recovery_fetch: bool,
pub max_total_results: usize,
pub max_query_budget: usize,
pub max_search_queries: usize,
pub results_per_query: usize,
pub blocked_domains: Vec<String>,
pub allowed_domains: Vec<String>,
pub debug: bool,
pub log_file: String,
pub trace: bool,
pub adaptive_budget: AdaptiveBudget,
pub adaptive_budget_fetch_factor: u32,
pub language: String,
}Expand description
Server-level settings and anti-flooding caps.
Fields§
§max_download_mb: u32Streaming download cap per page in megabytes (default: 1).
max_result_length: usizeHard character cap per cleaned page (default: 8000). Set to 0 to
disable the cap entirely (no truncation).
search_timeout: u64Per-request timeout in seconds for fetch and search calls (default: 8).
oversampling_factor: u32Oversample multiplier: fetch results_per_query * factor candidates (default: 2).
auto_recovery_fetch: boolWhen true, replace failed fetches with reserve-pool pages (default: false).
max_total_results: usizeHard cap on total results returned per query call (default: 20).
max_query_budget: usizeTotal character budget across all sources in a single query (default: 32000).
max_search_queries: usizeMaximum number of search queries per call, including LLM expansions (default: 5).
results_per_query: usizeResults requested per backend query (default: 5).
blocked_domains: Vec<String>Domain blocklist — URLs matching these domains are silently dropped.
allowed_domains: Vec<String>Domain allowlist — when non-empty, only these domains pass the filter.
debug: boolEnable debug-level logging (default: false).
log_file: StringPath to a log file (empty = stderr only).
trace: boolEnable trace-level logging (default: false).
adaptive_budget: AdaptiveBudgetControls proportional budget allocation after BM25 reranking.
adaptive_budget_fetch_factor: u32Fetch factor for adaptive budget: fetch up to max_result_length * factor chars
before trimming proportionally (default: 3).
language: StringBCP-47 language tag passed to search backends (e.g. “en”, “it”, “all”). Empty string = let the backend decide.
Implementations§
Source§impl ServerConfig
impl ServerConfig
Sourcepub fn max_download_bytes(&self) -> usize
pub fn max_download_bytes(&self) -> usize
Hard cap in bytes for streaming download.
Trait Implementations§
Source§impl Clone for ServerConfig
impl Clone for ServerConfig
Source§fn clone(&self) -> ServerConfig
fn clone(&self) -> ServerConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more