- FTS search results now ORDER BY processed_at DESC (was rank)
- Full search page shows processed timestamp with formatDateTime
- Quick search dropdown shows formatted date next to category
- Fixed formatDate to handle timezone-aware timestamps
SearchDocuments excludes full_text for performance. The MD endpoint
needs the actual OCR content, not just the summary.
Added SearchDocumentsWithFullText() and SearchDocumentsWithFullTextFallback()
that select full_text explicitly. apiSearchMDHandler now uses these,
so format=md returns the complete OCR/markdown text for each document.
New endpoint returns all matching documents as concatenated plain-text
markdown, one section per document separated by ---.
Format:
# Document: {title}
ID: {id} | Category: {category} | Date: {date} | Vendor: {vendor}
{full_text or summary}
---
Parameters:
q - search query (required)
format - must be 'md' (required; distinguishes from HTML search)
Uses same FTS5 search as existing endpoints, limit raised to 200.
Falls back to LIKE search if FTS5 fails. Returns text/markdown content type.
POST /api/search (HTML partial) unchanged.
- servePDF now supports ?download=1 query param
- Looks up document title and uses it as the Content-Disposition filename
- Download button on document page triggers actual download (not tab open)
- Added sanitizeFilename helper for safe Content-Disposition values
- Share table with random tokens and optional expiry (default 7 days)
- Public /s/{token} endpoint serves PDF directly
- Share/revoke UI on document page with copy-to-clipboard
- Caddy reverse proxy configured at docs.jongsma.me