Add SearchXNG and SethSearch project context docs
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
# 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.
|
||||
@@ -0,0 +1,36 @@
|
||||
# Operations Runbook
|
||||
|
||||
## Common commands
|
||||
|
||||
- SethSearch service status:
|
||||
- `ssh pve173 "pct exec 620 -- systemctl status sethsearch --no-pager"`
|
||||
- SethSearch logs:
|
||||
- `ssh pve173 "pct exec 620 -- journalctl -u sethsearch -n 100 --no-pager"`
|
||||
- SearXNG service status:
|
||||
- `ssh pve173 "pct exec 119 -- systemctl status searxng --no-pager"`
|
||||
- SearXNG logs:
|
||||
- `ssh pve173 "pct exec 119 -- journalctl -u searxng -n 100 --no-pager"`
|
||||
|
||||
## Verify behavior
|
||||
|
||||
- General search endpoint:
|
||||
- `curl -s "https://sethsearch.sethpc.xyz/search?q=home&source=general&limit=5"`
|
||||
- Sethflix endpoint:
|
||||
- `curl -s "https://sethsearch.sethpc.xyz/search?q=always%20sunny&source=sethflix&limit=5"`
|
||||
- Stats:
|
||||
- `curl -s "https://sethsearch.sethpc.xyz/stats"`
|
||||
|
||||
## Config touchpoints
|
||||
|
||||
- SethSearch config: `/opt/sethsearch/config.json`
|
||||
- SethSearch code: `/opt/sethsearch/sethsearch.py`
|
||||
- SearXNG config: `/etc/searxng/settings.yml`
|
||||
- Caddy config: `/etc/caddy/Caddyfile`
|
||||
|
||||
## Change protocol
|
||||
|
||||
1. Edit SethSearch code/config.
|
||||
2. Restart SethSearch and verify `/health` and `/stats`.
|
||||
3. Edit SearXNG engines (if needed).
|
||||
4. Restart SearXNG and verify `/config` engine list.
|
||||
5. Validate top query use-cases.
|
||||
Reference in New Issue
Block a user