Phase 1: Command palette (⌘K), editor autosave with quiet auto-saves, dashboard saved views from API + quick links + onboarding seed CTA, explicit task scan panel. Phase 2: Context pack formatter with YAML frontmatter, copy on note + workspace .md export. Phase 3: ADR for hybrid search without embeddings; POST /notes/search (lexical + ranked hybrid); search UI mode toggle. Phase 4: POST copilot + suggest-title; in-editor copilot actions; /chat retrieval answers with citations (backend chat.rag_enabled). Phase 5: Settings MCP snippet, offline queue note, API token deferral; DEEP_LINKS.md. Phase 6: Note shares + public GET; share page; POST onboarding-seed. Phase 7: note_versions on PATCH; version panel; create-note templates; PWA manifest. Flags: search.hybrid_enabled, copilot.enabled, chat.rag_enabled, onboarding.seed_enabled. Made-with: Cursor
28 lines
1.4 KiB
Markdown
28 lines
1.4 KiB
Markdown
# ADR 2026-03-31 — Hybrid note search without vector embeddings (NoteLett)
|
|
|
|
## Status
|
|
|
|
Accepted — implemented in NoteLett backend `POST /notes/search`.
|
|
|
|
## Context
|
|
|
|
Full semantic search requires embedding models, batch indexing, and higher infra cost. NoteLett needed **ranked search with explainability** (match kind: title, body, tag) for the AI-fast roadmap without blocking on a shared RAG platform.
|
|
|
|
## Decision
|
|
|
|
1. **Phase A (shipped):** Implement **lexical + in-process re-ranking** on decrypted note text:
|
|
- Load candidate notes via existing datastore query (`search` substring filter when query non-empty; recent notes when empty).
|
|
- Score with token overlap: title > tags > body; multi-word queries use AND semantics.
|
|
- Return `score`, `matchKind`, and `snippet` for each hit.
|
|
|
|
2. **Phase B (future):** Optional integration with a **shared embedding / RAG service** or Cosmos vector index when product and cost model allow. The ADR in this doc should be updated to reference the chosen provider and index update path (on note write vs batch).
|
|
|
|
## Consequences
|
|
|
|
- **Pros:** No new services; works with current Fastify + datastore; explainable results.
|
|
- **Cons:** Not true semantic similarity; large workspaces may need stricter candidate limits or Phase B.
|
|
|
|
## Feature flags
|
|
|
|
- `search.hybrid_enabled` — when false, `POST /notes/search` lexical mode only (substring list).
|