feat: add files notes and search
This commit is contained in:
19
backend/migrations/0001_search_indexes.sql
Normal file
19
backend/migrations/0001_search_indexes.sql
Normal file
@@ -0,0 +1,19 @@
|
||||
CREATE INDEX IF NOT EXISTS idx_notes_search
|
||||
ON notes
|
||||
USING gin (to_tsvector('simple', coalesce(title, '') || ' ' || coalesce(markdown, '')));
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_sources_search
|
||||
ON sources
|
||||
USING gin (to_tsvector('simple', coalesce(title, '') || ' ' || coalesce(url, '') || ' ' || coalesce(content_text, '')));
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_inbox_items_search
|
||||
ON inbox_items
|
||||
USING gin (to_tsvector('simple', coalesce(title, '') || ' ' || coalesce(body, '')));
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_tasks_search
|
||||
ON tasks
|
||||
USING gin (to_tsvector('simple', coalesce(title, '') || ' ' || coalesce(description, '')));
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_ai_sessions_search
|
||||
ON ai_sessions
|
||||
USING gin (to_tsvector('simple', coalesce(title, '') || ' ' || coalesce(context, '')));
|
||||
Reference in New Issue
Block a user