Search
Claspt includes a fast, full-text search engine powered by tantivy (a Rust search library inspired by Apache Lucene). Search works across all folders and indexes your pages automatically as you write.
Opening Search
Section titled “Opening Search”Press Cmd+K (macOS) or Ctrl+K (Windows/Linux) to open the search panel. Start typing and results appear instantly.
You can also click the search icon in the sidebar header.
How Search Works
Section titled “How Search Works”When you type a query, Claspt searches across multiple fields in every page. Results are ranked by relevance, with different fields contributing different weights:
| Field | Boost | What’s Indexed |
|---|---|---|
| Title | 3x | The page title from frontmatter |
| Tags | 2x | All tags on the page |
| Secret labels | 2x | The label text of :::secret[Label] blocks |
| Content | 1x | The full markdown body (excluding secret values) |
This means a search for “AWS” will prioritize a page titled “AWS Credentials” over a page that merely mentions AWS in a paragraph.
Search Syntax
Section titled “Search Syntax”Claspt uses straightforward text matching — type words and the engine finds pages containing those terms.
| Query | Matches |
|---|---|
database | Pages containing “database” in any indexed field |
database password | Pages containing both “database” and “password” |
AWS production | Pages with both “AWS” and “production” |
"exact phrase" | Pages containing the exact phrase in quotes |
Search is case-insensitive — aws, AWS, and Aws all return the same results.
What’s NOT Searchable
Section titled “What’s NOT Searchable”By design, secret values are never indexed. This is a core security property:
| Searchable | Not Searchable |
|---|---|
| Page titles | Secret values (the encrypted content) |
| Page content (outside secrets) | Full-body encrypted page content |
| Tags | |
| Secret labels (e.g., “AWS Access Key”) | |
| Folder names |
If you store an API key like sk-abc123 inside a :::secret[Stripe API Key] block, searching for “sk-abc123” returns nothing — but searching for “Stripe API Key” will find the page via the secret label.
Navigating Results
Section titled “Navigating Results”Search results appear as a ranked list showing:
- Page title (highlighted matching terms)
- Snippet with matching context from the content
- Folder path so you know where the page lives
- Tags if any matched the query
Click a result to open the page in the editor. Press Escape to close the search panel and return to your current page.
Keyboard Navigation
Section titled “Keyboard Navigation”| Key | Action |
|---|---|
Cmd+K / Ctrl+K | Open search |
Up / Down | Navigate results |
Enter | Open selected result |
Escape | Close search |
Search Across All Folders
Section titled “Search Across All Folders”Search is vault-wide by default. It doesn’t matter which folder you have selected in the sidebar — search always looks through every page in every folder.
This makes search the fastest way to jump to any page, regardless of your current folder context.
The Search Index
Section titled “The Search Index”The search index is built with tantivy and stored locally in .securenotes/index/. Key properties:
- Local-only — The index is never synced between devices. Each device builds its own.
- Automatic — Pages are indexed as you create and edit them. No manual step needed for normal use.
- Excluded from Git — The index directory is in
.securenotes/, which is gitignored. - Rebuilding is safe — Rebuilding only reads your existing pages; it never modifies them.
Rebuilding the Search Index
Section titled “Rebuilding the Search Index”If the index becomes corrupted or out of sync with your pages — for example, after restoring a vault from backup or syncing a large number of changes — you can rebuild it:
- Open Settings (gear icon or
Cmd+,/Ctrl+,). - Navigate to Utilities.
- Click Rebuild Search Index.
Claspt re-scans every page in your vault and rebuilds the tantivy index from scratch. This is usually fast (a few seconds for hundreds of pages).
Tips for Effective Searching
Section titled “Tips for Effective Searching”- Use descriptive titles — They get 3x weight, so a good title makes pages easy to find.
- Tag generously — Tags get 2x weight and let you find pages by category, project, or status.
- Name your secrets clearly — Secret labels like “Production DB Password” are searchable and get 2x weight.
- Search before creating — Press
Cmd+Kto quickly check if you already have a page for something before creating a duplicate. - Use quotes for exact phrases — Wrap multi-word queries in double quotes to match the exact phrase rather than individual terms.