This commit is contained in:
mike
2025-12-13 11:56:06 +01:00
commit 2b2c575385
57 changed files with 6505 additions and 0 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, '')));