mprince1 downloadsSearch your vault with the closest match first, ranking exact titles and headings above notes that only mention your words.
An Obsidian plugin that searches your vault and puts the closest match first.
Searching reading list puts results in this order:
## Fall reading listIt also handles:
reading lists matches Reading List.reading list finds myReadingList.reding list still finds Reading List. Corrected matches rank below exact ones.reading li already finds Reading List.aliases in a note's frontmatter count as titles.Each result shows its folder and a preview line with your words highlighted. Choosing a result opens the note at the matching line with the words selected. With an empty search box, it lists your recently opened notes.
Open the search in any of these ways:
In the search box:
Excluded folders: folders to leave out of search, one per line. When empty, the whole vault is searched.
main.js, manifest.json and styles.css from the latest release.<your vault>/.obsidian/plugins/ranked-search/ and put the three files in it. On macOS, press Cmd+Shift+. in Finder to show the hidden .obsidian folder.Ranked Search works entirely offline. It reads the notes in your vault to build its index in memory, and it doesn't send anything over the network or store anything outside your vault.
Requires Node.js 22 or later.
npm install
npm run dev # rebuild main.js on every change
npm test # ranking tests
npm run build # type-check and production build
npm run lint
To try a build in a vault, run npm run deploy. It builds the plugin and copies main.js, manifest.json and styles.css into ~/Documents/Obsidian Vault/.obsidian/plugins/ranked-search/. To use a different vault, set OBSIDIAN_VAULT to its folder, without extra quotes inside the value:
OBSIDIAN_VAULT=~/Notes npm run deploy
Reload Obsidian afterwards.
| File | Purpose |
|---|---|
src/rank.ts |
Query parsing and scoring. It doesn't import Obsidian, so test/rank.test.ts runs it with plain Node. |
src/vault-index.ts |
Keeps each note's text in memory and updates it as files change. |
src/search-modal.ts |
The search popup: results, previews and opening the match. |
src/main.ts |
Plugin setup, the command and the settings tab. |
npm version patch # or minor / major
git push --follow-tags
npm version updates package.json, manifest.json and versions.json and creates a tag. Pushing the tag runs the release workflow, which tests and builds the plugin and creates a draft GitHub release with main.js, manifest.json and styles.css attached. Add release notes and publish the draft.