This commit is contained in:
mike
2025-12-13 11:35:33 +01:00
parent 9759001f4c
commit e9eb7ea5d9
16 changed files with 899 additions and 216 deletions

View File

@@ -0,0 +1,11 @@
-- Add extracted text and enrichment columns
ALTER TABLE files ADD COLUMN IF NOT EXISTS extracted_text TEXT;
ALTER TABLE files ADD COLUMN IF NOT EXISTS text_quality VARCHAR(20);
ALTER TABLE files ADD COLUMN IF NOT EXISTS enrichment JSONB;
-- Add indexes for text search
CREATE INDEX IF NOT EXISTS idx_files_extracted_text ON files USING gin(to_tsvector('english', extracted_text));
CREATE INDEX IF NOT EXISTS idx_files_enrichment ON files USING gin(enrichment);
-- Add full text search capability
CREATE INDEX IF NOT EXISTS idx_files_fts ON files USING gin(to_tsvector('english', COALESCE(extracted_text, '')));