KB Search Implementation (Portal v2)
Portal v2 uses a deliberately simple, client-side search for Phase 2.
Where it lives
portal/v2/components/search.js
- Used by:
portal/v2/knowledge_base.html
Index used
portal/v2/data/unified_index.json
Ranking strategy (MVP)
- Tokenize query into lowercase tokens
- Score items by:
- +3 per token match in
title or snippet
- +1 per token match in serialized
tags
- Filter controls:
source_type (podcast/website/interview)
language_available (fr/en)
sensitivity (public/internal)
Why this is enough for Phase 2
- Works offline with prebuilt indexes
- No dependencies
- Easy to replace later with Fuse.js or embeddings if needed