--- category: reference tags: [tasks, semantic-search, faiss, multi-tenant] last_updated: 2026-03-20 confidence: high --- # Semantic Search Multi-Tenant — IMPLEMENTED ## Solution (2026-03-20) All multi-tenant issues resolved. FAISS backend with `BackendRegistry` provides per-wiki isolation. ### Implementation - **BackendRegistry** manages per-wiki FAISS backends with lazy initialization - **Per-wiki FAISS indexes** at `/srv/data/faiss/{slug}/` — natural isolation, no slug-prefix hacking - **Lifecycle hooks** (`page_saved`/`page_deleted`/`page_renamed`) via `HookListener` replace the single-tenant sync thread - **`reindex_all` is per-wiki scoped** — reindexing one wiki does not affect others - **Auto-index on first access** — existing pages are back-filled when a wiki is first accessed - **ONNX MiniLM-L6-v2 embeddings** (ChromaDB bundled) — no model download issues - ChromaDB deprecated and disabled ### Original problems (all resolved) 1. **One shared ChromaDB collection** — Replaced by per-wiki FAISS directories. 2. **One sync thread** tied to default wiki — Replaced by per-request lifecycle hooks. 3. **`reindex_all` wipes everything** — Now per-wiki scoped. 4. **No auto-index for new wikis** — Auto-reindex on first wiki access. 5. **Embedding model download** — ONNX model bundled, no download needed. ## Related - [[Tasks/Semantic_Search_Architecture]] — overall architecture - [[Dev/Proxmox_CPU_Type]] — numpy X86_V2 issue (workaround in place) - [[Design/Async_Embedding_Pipeline]] — original FAISS + MiniLM design (AWS, archived)
