Notes Search
Search Ben’s personal notes and org files using hybrid BM25 + vector search.
Process
- Search for relevant notes - Run notes-search with the query
- Review results - Check file paths, titles, and snippets
- Read full content - Use
read_fileon promising results - Synthesize answer - Combine information from multiple notes if needed
Overview
The notes-search CLI indexes markdown and org files from ~/notes and ~/org, providing:
- BM25: Fast keyword matching
- Vector: Semantic similarity via embeddings
- Hybrid: Combined ranking using Reciprocal Rank Fusion (default)
Binary Location
~/omni/ava/_/nix/Omni/Notes/Cli.hs/bin/notes-search
Basic Usage
# Hybrid search (default, best quality)
~/omni/ava/_/nix/Omni/Notes/Cli.hs/bin/notes-search "your query here"
# Keyword-only search (faster)
~/omni/ava/_/nix/Omni/Notes/Cli.hs/bin/notes-search --bm25 "exact phrase"
# Semantic search (finds conceptually related content)
~/omni/ava/_/nix/Omni/Notes/Cli.hs/bin/notes-search --vector "concept or idea"
# JSON output for structured parsing
~/omni/ava/_/nix/Omni/Notes/Cli.hs/bin/notes-search --json "query"
# Limit results
~/omni/ava/_/nix/Omni/Notes/Cli.hs/bin/notes-search --limit=5 "query"
Examples
# Find notes about a specific topic
~/omni/ava/_/nix/Omni/Notes/Cli.hs/bin/notes-search "machine learning"
# Find notes about a person
~/omni/ava/_/nix/Omni/Notes/Cli.hs/bin/notes-search "meeting with John"
# Find conceptually related notes (even without exact keywords)
~/omni/ava/_/nix/Omni/Notes/Cli.hs/bin/notes-search --vector "productivity systems"
# Get JSON for parsing
~/omni/ava/_/nix/Omni/Notes/Cli.hs/bin/notes-search --json --limit=3 "project ideas" | jq .
Output Format
Default output shows file path, line number, title, and snippet:
/home/ben/notes/wiki/Topic.md:15 [Section Title]
First line of content...
Second line of content...
JSON output (--json) returns:
[
{
"file": "/home/ben/notes/wiki/Topic.md",
"line": 15,
"title": "Section Title",
"snippet": "Content preview...",
"score": 0.85
}
]
When to Use
- Answering questions about Ben’s knowledge/notes: Search first, then read relevant files
- Finding context for tasks: Look up related notes before starting work
- Recalling past decisions/discussions: Notes often contain meeting notes and decisions
- Finding project documentation: Ben keeps project notes in
~/notes
Search Strategy
- Start with hybrid search (default) - best overall quality
- Use
--bm25when you know exact terms or names - Use
--vectorwhen looking for concepts without knowing exact wording - Use
--limit=Nto get more/fewer results (default: 10)
Index Management
# Rebuild index (if notes were added/changed)
~/omni/ava/_/nix/Omni/Notes/Cli.hs/bin/notes-search --reindex
# Generate embeddings for new content
~/omni/ava/_/nix/Omni/Notes/Cli.hs/bin/notes-search --embed=8
Indexed Directories
~/notes- Personal wiki, project notes, references~/org- Org-mode files, todos, journal entries
Tips
- Search before asking - Ben’s notes likely contain answers to many questions
- Read the files - After finding relevant results, use
read_fileto get full context - Combine with grep - Use
rgto search within a specific file found by notes-search - Check multiple results - The best answer might not be the first result