-- PROJ: manticore-search-index-phase1 -- Doku-only. KEINE PostgreSQL-Schema-Änderung in dieser Phase — Postgres -- (documents + Taxonomie + document_visibility) bleibt Source of Truth und -- unverändert. Diese Datei dokumentiert nur den externen Volltext-Index. -- -- Phase 1 der geplanten Manticore-Search-Integration (Hybrid BM25+Vektor -- kommt später): NUR Schema + Sync-Layer, KEIN Such-Endpunkt. -- -- Der Index läuft in Manticore Search (MySQL-Protokoll, Default Port 9306), -- angesprochen über internal/index (github.com/go-sql-driver/mysql, CGO-frei). -- Pro Mandant existiert eine RT-Tabelle documents_tenant_, die -- idempotent von ensureTable() angelegt wird: -- -- CREATE TABLE documents_tenant_N ( -- doc_id string, -- title text, -- doc_type text, -- correspondent text, -- ocr_text text, -- tags text, -- tag_ids multi, -- doc_type_id bigint, -- correspondent_id bigint, -- acl_group_ids multi, -- retain_until_ts bigint, -- created_ts bigint, -- updated_ts bigint, -- deleted uint -- ) type='rt' morphology='lemmatize_de_all,stem_en' -- -- Aktivierung nur wenn index.manticore_dsn in der config.yml gesetzt ist — -- sonst ist der Indexer nil und alle Sync-Aufrufe sind No-ops. -- -- Sync-Punkte (alle best-effort, Fehler werden nur geloggt, blockieren nie den -- Haupt-Request — Postgres bleibt maßgeblich): -- * Dokument-Upload/Create -> IndexSync -- * RecomputeVisibility (ACL/Tags/DocType) -> IndexSync -- * SetDocumentCorrespondent -> IndexSync -- * Custom-Field-Werte setzen -> IndexSync -- * SoftDeleteDocument (Papierkorb) -> Delete (nicht mehr auffindbar) -- * RestoreDocument -> IndexSync (wieder auffindbar) -- * ConfirmDeleteRequest (final/executed) -> Delete (GoBD: endgültig weg)