| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- # Veeru laiuse muudatus
- docker exec -it postgres_postgis bash -c "
- export PGPASSWORD='osm' &&
- psql -U osm -h localhost -d pdf_research -c \"
- ALTER TABLE chunks
- ALTER COLUMN embedding TYPE vector(384);
- \"
- "
- docker exec -it postgres_postgis bash -c "
- export PGPASSWORD='osm' &&
- psql -U osm -h localhost -d pdf_research -c \"
- DROP INDEX IF EXISTS idx_chunks_embedding;
- CREATE INDEX idx_chunks_embedding ON chunks
- USING ivfflat (embedding vector_cosine_ops) WITH (lists = 100);
- \"
- "
- # Lisa raw_documents tabelisse täiendavad veerud weaviate baasist ülekandmiseks
- docker exec -it postgres_postgis bash -c "
- export PGPASSWORD='osm' &&
- psql -U osm -h localhost -d pdf_research -c \"
- ALTER TABLE raw_documents
- ADD COLUMN IF NOT EXISTS weaviate_article_id UUID,
- ADD COLUMN IF NOT EXISTS title TEXT,
- ADD COLUMN IF NOT EXISTS doi TEXT,
- ADD COLUMN IF NOT EXISTS journal TEXT,
- ADD COLUMN IF NOT EXISTS year REAL,
- ADD COLUMN IF NOT EXISTS authors TEXT[],
- ADD COLUMN IF NOT EXISTS key_concepts TEXT[],
- ADD COLUMN IF NOT EXISTS methods_used TEXT[],
- ADD COLUMN IF NOT EXISTS summary_et TEXT,
- ADD COLUMN IF NOT EXISTS abstract_en TEXT,
- ADD COLUMN IF NOT EXISTS transport_context JSONB,
- ADD COLUMN IF NOT EXISTS relevance_score REAL,
- ADD COLUMN IF NOT EXISTS processing_date TIMESTAMPTZ;
- CREATE INDEX idx_raw_weaviate_id ON raw_documents(weaviate_article_id);
- \"
- "
- # Kontrollli veeru olemasolu
- docker exec -it postgres_postgis bash -c "
- export PGPASSWORD='osm' &&
- psql -U osm -h localhost -d pdf_research -c \"
- SELECT column_name, data_type FROM information_schema.columns WHERE table_name = 'raw_documents' ORDER BY ordinal_position;
- \"
- "
|