initial
This commit is contained in:
11
sql/migration/V002__add_extracted_text.sql
Normal file
11
sql/migration/V002__add_extracted_text.sql
Normal 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, '')));
|
||||
Reference in New Issue
Block a user