Related Notes
approvedby Oluwasanya Awe
Discover related notes in your vault.
Related Notes Plugin for Obsidian
Find related notes in your vault using bloom filter similarity analysis.



Features
- Bloom filter-based similarity detection
- One-click linking between related notes
- Local processing (no data sent externally)
- Multi-language support including CJK scripts
- Automatic optimization for large vaults
Installation
- Open Obsidian Settings
- Navigate to Community plugins and disable Restricted mode
- Select Browse and search for "Related Notes"
- Select Install
- Enable the plugin in the Community plugins tab
Usage
Viewing related notes
- Select the lightning (β‘οΈ) icon in the ribbon to open the Related notes sidebar
- The plugin will automatically show related notes for your active note
- Select the Link button to create a link to a related note
- You can also use the command palette and search for "Toggle related notes"
Force re-indexing
The plugin automatically indexes your notes and updates the index when notes are modified. However, if you want to force a complete re-indexing of all notes:
- Open Obsidian Settings
- Navigate to the Related notes plugin settings
- In the "Index management" section, select the Rebuild index button
- Wait for the re-indexing to complete (progress will be shown in the status bar)
Force re-indexing is useful when:
- You've made significant changes to many notes
- You suspect the index might be out of date
- You want to ensure the most accurate related notes suggestions
Configuration
Settings:
- Maximum suggestions: Control how many related notes are displayed (1-20)
- Rebuild index: Button to trigger a complete re-indexing of all notes
Debug mode
Enable to view detailed statistics about the plugin's operation in the developer console.
How it works
The plugin uses bloom filters with n-gram analysis:
- Single-pass indexing of all notes
- Probabilistic similarity detection using 3-grams
- Text tokenization with CJK script support
- Automatic parameter optimization based on vault size
Performance
- Memory usage: ~1KB per 1000 notes
- Single-pass indexing with periodic cache saves
- Automatic sampling for vaults over 10,000 notes
- Incremental updates when files are modified
Development
Prerequisites
- Node.js 18+
- npm
- Basic knowledge of TypeScript and Obsidian Plugin Development
Setup
- Clone this repository
git clone https://github.com/mrboxtobox/obsidian-related-notes.git
cd obsidian-related-notes
- Install dependencies
npm install
- Build the plugin
npm run build
Development workflow
npm run dev- Starts development build with hot-reloadnpm run dev:test- Starts development build with hot-reload and copies files totest-vault(you will need to create this)npm run dev:custom- Starts development build with custom target directories (set TARGET_DIRS env var)npm run build- Creates a production buildnpm run build:test- Creates a production build and copies files to test-vaultnpm run build:custom- Creates a production build with custom target directories (set TARGET_DIRS env var)npm run version- Updates version numbers in manifest.json and versions.json
Project structure
src/main.ts- Main plugin file with core functionality and event handlingsrc/core.ts- Core similarity algorithms and interfacessrc/bloom.ts- Bloom filter implementation for efficient similarity calculationsrc/multi-bloom.ts- Multi-resolution bloom filter with adaptive parameterssrc/settings.ts- Settings tab implementationsrc/ui.ts- User interface components for related notes viewsrc/styles.css- Custom CSS styles for the pluginsrc/manifest.json- Plugin manifest filepackage.json- Project configuration and dependenciesesbuild.config.mjs- Build configuration for esbuild that handles copying files
Key dependencies
obsidian- Obsidian API types and utilities
Release Process
The following scripts are available to streamline the release process:
- Validate your plugin against Obsidian's requirements:
npm run validate
- Create a new release (patch, minor, or major version):
npm run release:patch # For bug fixes
npm run release:minor # For new features
npm run release:major # For breaking changes
The release script will:
- Check for uncommitted changes
- Validate the plugin against Obsidian's requirements
- Bump the version in package.json and manifest.json
- Create a git tag
- Push to GitHub
- Trigger the GitHub Actions workflow to create a release
- GitHub Actions will build the plugin and create a draft release with the required files:
main.jsmanifest.jsonstyles.css
- Review the draft release on GitHub and publish it when ready.
Acknowledgements
Special thanks to the following people for filing bug reports and helping improve this plugin:
Your feedback has been invaluable in improving this plugin.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
π¨ Troubleshooting
Plugin freezes or becomes unresponsive
If the plugin freezes during indexing or becomes unresponsive, especially in large vaults (5,000+ notes):
Quick Recovery Steps:
- Force-quit Obsidian completely (not just close the window)
- Remove the plugin cache by deleting the cache directory:
Or manually delete the# Navigate to your vault's .obsidian folder and run: rm -rf .obsidian/plugins/related-notes.obsidian/plugins/related-notesfolder - Restart Obsidian
- Reinstall the plugin from Community Plugins
- The plugin will rebuild its index automatically with optimizations for large vaults
Alternative Recovery (Preserve Settings):
If you want to keep your plugin settings:
- Force-quit Obsidian
- Delete only the cache files:
# In your vault's .obsidian/plugins/related-notes/ folder: rm -f .bloom-filter-cache.json rm -f bloom-filter-cache.json rm -f similarity-cache.json - Restart Obsidian
Index corruption issues
If you see errors like "Array length mismatch" or "Cache format incompatibility":
- The plugin automatically detects and fixes these issues
- If problems persist, follow the cache deletion steps above
- The plugin will rebuild with the correct format
Performance in large vaults
For vaults with 10,000+ notes:
- The plugin uses single-pass indexing with intelligent optimizations
- Initial indexing completes in one efficient pass
- Automatic sampling keeps performance excellent even in massive vaults
- Use the "Clear Cache" and "Rebuild Index" buttons in settings if needed
- Monitor progress in the status bar with real-time file information
Support
If you encounter any issues or have questions:
- Check the troubleshooting section above first
- Check the GitHub Issues
- Create a new issue if your problem hasn't been reported
- Use the Copy debug info in the Settings page to get additional details
- Provide as much information as possible, including:
- Steps to reproduce the issue
- Your Obsidian version
- Your plugin version
- Vault size (approximate number of notes)
- Any relevant error messages from the Developer Console (
cmd + option + ion Mac andctrl + shift + ifor Windows)
Architecture Overview
Architecture overview:
graph TD
A[Markdown Files] --> B[Tokenizer]
B --> C[Bloom Filter Generator]
C --> D[Index Cache]
E[User Opens Note] --> F[Similarity Calculator]
F --> D
F --> G[Candidate Selector]
G --> H[Related Notes Results]
I[File Changes] --> J[Incremental Updater]
J --> B
Data flow
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β Markdown β β Tokenizer β β Bloom Filter β
β Files βββββΆβ (N-grams) βββββΆβ Generator β
β β β β β β
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β
βΌ
βββββββββββββββββββ βββββββββββββββββββ
β File Events β β Index Cache β
β (Create/Edit) ββββββββββββββββββββββββββββΆβ (Memory+Disk) β
β β β β
βββββββββββββββββββ βββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββ
β Similarity Engine β
β β
β β’ Candidate Selection β
β β’ Bloom Filter Comparison β
β β’ Similarity Scoring β
β β’ Result Ranking β
βββββββββββββββββββββββββββββββ
Support the Project
If this plugin helps you discover meaningful connections in your notes, consider supporting its development:
Your support helps maintain and improve this plugin. Thank you! βοΈ
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.