server: use fetched contents of news for search index
This commit is contained in:
@@ -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)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user