From 2bc083fb95da11d5cf43074ea85590bfaf040eca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Ty=C5=84ski?= Date: Sun, 4 Oct 2026 02:44:03 +0200 Subject: [PATCH] feat(sql): add problem embedding vector index --- backend/migrations/0005_problem_embedding.surql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 backend/migrations/0005_problem_embedding.surql diff --git a/backend/migrations/0005_problem_embedding.surql b/backend/migrations/0005_problem_embedding.surql new file mode 100644 index 0000000..9b272f8 --- /dev/null +++ b/backend/migrations/0005_problem_embedding.surql @@ -0,0 +1,6 @@ +-- TarninaHub — migration 0005: problem embeddings for semantic matchmaking +-- Idempotent, additive. Mirrors the innovation vector index. + +DEFINE FIELD IF NOT EXISTS embedding ON TABLE problem TYPE option>; +DEFINE INDEX IF NOT EXISTS problem_embedding ON TABLE problem FIELDS embedding + HNSW DIMENSION 1536 DIST COSINE TYPE F32;