server: use fetched contents of news for search index

This commit is contained in:
2025-01-29 14:08:20 -08:00
parent c7aa32b922
commit 12c8e0e33b
12 changed files with 168 additions and 87 deletions

View File

@@ -1,10 +1,9 @@
SELECT
COUNT(*) count
SELECT COUNT(*) AS count
FROM
post
WHERE
(
$1 :: text IS NULL
$1::text IS NULL
OR site = $1
)
AND (
@@ -12,6 +11,7 @@ WHERE
OR NOT is_read
)
AND (
$3 :: text IS NULL
OR to_tsvector('english', summary) @@ websearch_to_tsquery('english', $3)
$3::text IS NULL
OR TO_TSVECTOR('english', search_summary)
@@ WEBSEARCH_TO_TSQUERY('english', $3)
)