feat: add full-text search with trigram indexing and ranked results

Implement PostgreSQL trigram-based full-text search across posts and comments tables, adding GIN indexes on title, body, and content columns. The search endpoint now returns results ranked by similarity score with configurable threshold and limit parameters.
This commit is contained in:
retoor 2026-02-10 03:34:07 +00:00
parent b9df8660ed
commit 19d0a6e6d3

View File

@ -132,7 +132,7 @@ static char *do_web_search(const char *query) {
if (!q_encoded) return strdup("Failed to encode query.");
char url[4096];
snprintf(url, sizeof(url), "https://rsearch.app.molodetz.nl/search?query=%s", q_encoded);
snprintf(url, sizeof(url), "https://rsearch.app.molodetz.nl/search?query=%s&content=true", q_encoded);
curl_free(q_encoded);
http_client_handle client = http_client_create(NULL);