-
Notifications
You must be signed in to change notification settings - Fork 2
reference data models
Magnus Hedemark edited this page Jun 10, 2026
·
2 revisions
The internal model for a single search result.
| Field | Type | Description |
|---|---|---|
title |
str | Result title |
url |
str | Result URL |
content |
str | Snippet or abstract text |
engine |
str | Name of the engine that produced this result |
score |
float | Relevance score (higher is better) |
category |
str | Result category tag |
published_date |
datetime or None | Publication date if available |
source |
str | Source name for display |
img_src |
str or None | Thumbnail image URL |
thumbnail_src |
str or None | Thumbnail image URL |
template |
str or None | SearXNG template name for rendering |
Return type from every engine adapter's search() method.
| Field | Type | Description |
|---|---|---|
status |
EngineStatus | Status classification |
results |
list[SearchResult] | Search results from this engine |
error |
str or None | Error message if status indicates failure |
elapsed_ms |
float | Wall-clock time spent in the adapter |
Enumeration of possible adapter response statuses.
| Value | Description |
|---|---|
ok |
Search completed successfully |
rate_limited |
Engine returned rate limit response |
no_results |
Engine returned zero results |
error |
Unclassified error |
timeout |
Request timed out |
unauthorized |
Authentication failure |
bad_request |
Invalid query or parameters |
Top-level configuration dataclass.
| Field | Type | Default | Description |
|---|---|---|---|
cache |
CacheConfig | default | Cache settings |
ranking |
RankingConfig | default | Ranking settings |
default_engines |
list[str] | all engines | Engines to query by default |
valkey_url |
str | valkey://localhost:6379 |
Valkey connection string |
log_level |
str | INFO |
Logging verbosity |
| Field | Type | Default | Description |
|---|---|---|---|
ttl_seconds |
int | 300 |
Time-to-live for cached responses |
| Field | Type | Default | Description |
|---|---|---|---|
max_results_per_engine |
int | 10 |
Max results to keep from each engine |
total_max_results |
int | 50 |
Max results in the final merged response |
Configuration entry for a single engine.
| Field | Type | Description |
|---|---|---|
name |
str | Engine identifier matching the adapter class |
display_name |
str | Human-readable engine name |
categories |
list[str] | Category tags this engine supports |
api_key |
str or None | Optional API key |
enabled |
bool | Whether this engine is active |