Notes Search

Search Ben’s personal notes and org files using hybrid BM25 + vector search.

Process

  1. Search for relevant notes - Run notes-search with the query
  2. Review results - Check file paths, titles, and snippets
  3. Read full content - Use read_file on promising results
  4. Synthesize answer - Combine information from multiple notes if needed

Overview

The notes-search CLI indexes markdown and org files from ~/notes and ~/org, providing:

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

Search Strategy

  1. Start with hybrid search (default) - best overall quality
  2. Use --bm25 when you know exact terms or names
  3. Use --vector when looking for concepts without knowing exact wording
  4. Use --limit=N to 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

Tips

  1. Search before asking - Ben’s notes likely contain answers to many questions
  2. Read the files - After finding relevant results, use read_file to get full context
  3. Combine with grep - Use rg to search within a specific file found by notes-search
  4. Check multiple results - The best answer might not be the first result