Skip to content

v0.12.0 — Contextual Search & Re-ranking

Latest

Choose a tag to compare

@jawache jawache released this 13 Feb 23:18
· 11 commits to main since this release

New Features

Contextual Search

The search sidebar now has a contextual mode that passively shows related vault content based on what you're currently looking at. As you type, navigate between files, or select text, the sidebar automatically updates with semantically related notes — surfacing connections you didn't know existed.

  • Toggle via checkbox in the search panel or command palette ("Toggle contextual search")
  • Selection priority: highlighted text takes precedence, otherwise uses the paragraph around your cursor
  • Debounced: 1.5s after edits, 500ms after navigation, 800ms after cursor moves
  • Vector-only search for semantic relevance (not keyword matching)
  • Current file automatically excluded from results

LLM Re-ranking

Optional two-stage search: hybrid search finds candidates, then a local Ollama LLM re-ranks them by relevance.

  • New "Re-rank" toggle in the search panel
  • Settings UI with model dropdown, suggested models, and pull buttons
  • Animated status banner showing re-ranking progress
  • Enter-only search when re-rank enabled (no debounce)
  • Graceful degradation: JSON parse → regex fallback → original ordering

Page Preview on Search Results

Hold Cmd (or Ctrl) and hover over any search result card to see Obsidian's built-in Page Preview popup — works for both whole-file and heading-level results.

Configurable Idle Threshold

The idle detection threshold for background indexing is now configurable in Settings → Search → Indexing Filters (default: 2 minutes).

Bug Fixes

  • Triage cache race condition: mark_triage now waits for the metadata cache to update before returning, preventing get_next_chaos from returning stale results

Technical Details

  • Re-ranking uses OllamaProvider.generate() with /api/generate endpoint
  • listChatModels() filters by completion capability for model selection
  • Contextual search adds ~330 lines across search-view.ts, main.ts, and styles.css
  • Three event sources coordinated with per-source debounce timings
  • Hash-based deduplication prevents redundant embedding calls