chore: remove old filters, hardcoded types, old post status from view

This commit is contained in:
Cory Dransfeldt 2024-10-13 15:51:27 -07:00
parent ffea333d55
commit 76a172bb74
No known key found for this signature in database
15 changed files with 15 additions and 48 deletions

View file

@ -1,7 +1,6 @@
CREATE OR REPLACE VIEW optimized_search_index AS
WITH search_data AS (
SELECT
'post' AS content_type,
CONCAT('📝 ', p.title) AS title,
CONCAT('https://coryd.dev', p.url) AS url,
p.tags,
@ -12,7 +11,6 @@ WITH search_data AS (
UNION ALL
SELECT
'link' AS content_type,
CONCAT('🔗 ', l.title, ' via ', l.name) AS title,
l.link AS url,
l.tags,
@ -23,7 +21,6 @@ WITH search_data AS (
UNION ALL
SELECT
'book' AS content_type,
CASE
WHEN b.rating IS NOT NULL THEN CONCAT('📖 ', b.title, ' (', b.rating, ')')
ELSE CONCAT('📖 ', b.title)
@ -38,7 +35,6 @@ WITH search_data AS (
UNION ALL
SELECT
'movie' AS content_type,
CASE
WHEN m.rating IS NOT NULL THEN CONCAT('🎥 ', m.title, ' (', m.rating, ')')
ELSE CONCAT('🎥 ', m.title)
@ -53,7 +49,6 @@ WITH search_data AS (
UNION ALL
SELECT
'artist' AS content_type,
CONCAT('🎧 ', ar.name, ' - ', ar.genre_name) AS title,
CONCAT('https://coryd.dev', ar.url) AS url,
ARRAY[ar.genre_name] AS tags,
@ -64,7 +59,6 @@ WITH search_data AS (
UNION ALL
SELECT
'genre' AS content_type,
CONCAT('🎵 ', g.name) AS title,
CONCAT('https://coryd.dev', g.url) AS url,
NULL AS tags,