@machynx/data-db 1.0.4 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,19 @@
1
+ -- Enable pgvector extension
2
+ CREATE EXTENSION IF NOT EXISTS vector;
3
+
4
+ -- Create vector indexes (HNSW is faster than IVFFlat)
5
+ CREATE INDEX chatbot_message_embedding_idx
6
+ ON chatbot."ChatbotMessage"
7
+ USING hnsw (embedding vector_cosine_ops);
8
+
9
+ CREATE INDEX knowledge_chunk_embedding_idx
10
+ ON chatbot."ChatbotKnowledgeChunk"
11
+ USING hnsw (embedding vector_cosine_ops);
12
+
13
+ CREATE INDEX knowledge_base_embedding_idx
14
+ ON chatbot."ChatbotKnowledgeBase"
15
+ USING hnsw (embedding vector_cosine_ops);
16
+
17
+ CREATE INDEX search_history_embedding_idx
18
+ ON chatbot."ChatbotSearchHistory"
19
+ USING hnsw (embedding vector_cosine_ops);