scripts/setup_mindnet_collections.py aktualisiert
All checks were successful
Deploy mindnet to llm-node / deploy (push) Successful in 2s
All checks were successful
Deploy mindnet to llm-node / deploy (push) Successful in 2s
This commit is contained in:
parent
a7f3fc5784
commit
12043b7752
|
|
@ -1,12 +1,12 @@
|
|||
#!/usr/bin/env python3
|
||||
"""
|
||||
Erzeugt Qdrant-Collections für das mindnet-Projekt:
|
||||
Richtet die Qdrant-Collections für das mindnet-Projekt ein.
|
||||
|
||||
- mindnet_chunks : semantische Suche über Markdown-Text-Chunks (384/Cosine)
|
||||
- mindnet_notes : 1 Punkt pro Notiz (Metadaten, optional Titel-Embedding)
|
||||
- mindnet_chunks : semantische Suche über Text-Chunks (384/Cosine)
|
||||
- mindnet_notes : 1 Punkt pro Notiz (optional Titel-Embedding)
|
||||
- mindnet_edges : explizite Link-Kanten (Dummy-Vektor size=1; Filter über Payload)
|
||||
|
||||
Idempotent: legt nur an, wenn nicht vorhanden. Legt sinnvolle Payload-Indizes an.
|
||||
Idempotent: legt nur an, wenn nicht vorhanden.
|
||||
"""
|
||||
|
||||
import os
|
||||
|
|
@ -55,6 +55,7 @@ def main():
|
|||
ap.add_argument("--distance", default="Cosine", choices=["Cosine", "Euclid", "Dot"], help="Distanzmetrik")
|
||||
args = ap.parse_args()
|
||||
|
||||
# Qdrant-URL überschreiben, falls per Argument gesetzt
|
||||
global DEFAULT_QDRANT_URL
|
||||
DEFAULT_QDRANT_URL = args.qdrant_url
|
||||
|
||||
|
|
@ -67,21 +68,18 @@ def main():
|
|||
create_collection(notes, size=args.dim, distance=args.distance)
|
||||
create_collection(edges, size=1, distance=args.distance) # Dummy-Vektor
|
||||
|
||||
# 2) Indizes definieren
|
||||
# mindnet_chunks: häufige Filter + Volltext
|
||||
# 2) Indizes
|
||||
for f in ["note_id", "Status", "Typ", "title", "path"]:
|
||||
create_keyword_index(chunks, f)
|
||||
for f in ["tags", "Rolle", "links"]:
|
||||
create_keyword_index(chunks, f)
|
||||
create_text_index(chunks, "text") # Wort-/Phrasensuche
|
||||
create_text_index(chunks, "text")
|
||||
|
||||
# mindnet_notes: Metadaten der Notizen
|
||||
for f in ["note_id", "title", "path", "Typ", "Status"]:
|
||||
create_keyword_index(notes, f)
|
||||
for f in ["tags", "Rolle"]:
|
||||
create_keyword_index(notes, f)
|
||||
|
||||
# mindnet_edges: Graph/Kanten (Filter-only)
|
||||
for f in ["src_note_id", "dst_note_id", "src_chunk_id", "dst_chunk_id", "link_text", "relation"]:
|
||||
create_keyword_index(edges, f)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user