Files
searchxng-project/context/ARCHITECTURE.md
T

32 lines
1.0 KiB
Markdown

# Architecture
## Request flow
1. User query enters SearXNG (`search.sethpc.xyz`).
2. SearXNG calls `json_engine` endpoint at SethSearch API.
3. SethSearch queries local SQLite FTS5 index and returns normalized results.
4. SearXNG merges SethSearch with other engines and renders the result page.
## Data plane
- Index DB: `/opt/sethsearch/articles.db`
- Tables:
- `documents` (canonical indexed records)
- `documents_fts` (FTS5 virtual table)
- Source-level scoring and matching occur in SethSearch.
## Source adapters
- Caddy snapshot parser: domain discovery and tag generation.
- Gitea adapter: public repo metadata via REST.
- Wiki.js adapter: public crawl with fallback records.
- WordPress adapter: public posts/pages via `/wp-json/wp/v2/...`.
- Emby adapter: media index using server API token and deep links.
- FreshRSS adapter: GReader API article ingest.
## Reliability model
- SethSearch syncs sources independently.
- If one source fails, others continue and commit.
- Service runs under systemd with restart policy.