fix(core): Resolve persistence, indexing schema, and RAG collection bugs

- compose: Add persistent logs verification volume
- setup: Add DOCS_PATH configuration
- indexer: Fix missing 'metadata' column schema error during update
- rag: Fix collection name mismatch (trailing underscore)
This commit is contained in:
2025-12-09 22:26:21 +01:00
parent 417e575963
commit 7ed083299f
4 changed files with 15 additions and 11 deletions

View File

@@ -174,6 +174,14 @@ class DocumentIndexer:
# Update post_vectors to mark as document type
file_hash = self.get_file_hash(file_path)
with self.db_conn.cursor(DictCursor) as cur:
# Add metadata column if it doesn't exist
try:
cur.execute(
"ALTER TABLE post_vectors ADD COLUMN IF NOT EXISTS metadata JSON NULL"
)
except Exception:
pass # Column might already exist
cur.execute(
"""
UPDATE post_vectors
@@ -194,14 +202,6 @@ class DocumentIndexer:
)
)
# Add metadata column if it doesn't exist
try:
cur.execute(
"ALTER TABLE post_vectors ADD COLUMN IF NOT EXISTS metadata JSON NULL"
)
except Exception:
pass # Column might already exist
# DSGVO Audit Log
cur.execute(
"""

View File

@@ -33,8 +33,8 @@ class RAGChatService:
# Available document collections
self.doc_collections = [
"docs_crumbforest_",
"docs_rz_nullfeld_"
"docs_crumbforest",
"docs_rz_nullfeld"
]
def search_documents(