Related Notes

by Oluwasanya Awe
5
4
3
2
1
Score: 55/100

Description

The Related Notes plugin enhances knowledge discovery in your Obsidian vault by automatically surfacing contextually similar notes based on their content. Using advanced similarity algorithms, it identifies relevant connections between notes and presents them in a dedicated pane, allowing users to explore and link related concepts with a single click. It operates entirely offline, ensuring privacy while handling both small and large vaults efficiently through adaptive indexing and hybrid search methods. The plugin intelligently prioritizes frequently accessed and newly created notes for indexing and supports real-time similarity detection for others. Visual indicators and structured link insertion streamline the linking process without disrupting your note organization.

Reviews

No reviews yet.

Stats

22
stars
2,866
downloads
1
forks
394
days
39
days
39
days
13
total PRs
0
open PRs
2
closed PRs
11
merged PRs
5
total issues
0
open issues
5
closed issues
0
commits

Latest Version

a month ago

Changelog

Security patch

Fix 9 dependency vulnerabilities (4 high, 3 moderate, 2 low):

  • rollup: Arbitrary File Write via Path Traversal
  • minimatch: ReDoS via combinatorial backtracking
  • flatted: Prototype Pollution via parse()
  • js-yaml: Prototype pollution in merge
  • picomatch: Method Injection in POSIX Character Classes
  • brace-expansion: ReDoS and zero-step sequence DoS
  • vite: server.fs.deny bypass, HTML file settings, public directory serving
  • ajv: ReDoS with $data option

All are devDependencies (build/test tooling) — no impact on the plugin bundle shipped to users.

README file from

Github

Buy Me A Coffee

Find related notes in your vault using bloom filter similarity analysis.

Related Notes plugin on the right pane

Related Notes settings

Related Notes aren't shown for non-text types

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

  1. Open Obsidian Settings
  2. Navigate to Community plugins and disable Restricted mode
  3. Select Browse and search for "Related Notes"
  4. Select Install
  5. Enable the plugin in the Community plugins tab

Usage

  1. Select the lightning (⚡️) icon in the ribbon to open the Related notes sidebar
  2. The plugin will automatically show related notes for your active note
  3. Select the Link button to create a link to a related note
  4. 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:

  1. Open Obsidian Settings
  2. Navigate to the Related notes plugin settings
  3. In the "Index management" section, select the Rebuild index button
  4. 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

  1. Clone this repository
git clone https://github.com/mrboxtobox/obsidian-related-notes.git
cd obsidian-related-notes
  1. Install dependencies
npm install
  1. Build the plugin
npm run build

Development workflow

  • npm run dev - Starts development build with hot-reload
  • npm run dev:test - Starts development build with hot-reload and copies files to test-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 build
  • npm run build:test - Creates a production build and copies files to test-vault
  • npm 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 handling
  • src/core.ts - Core similarity algorithms and interfaces
  • src/bloom.ts - Bloom filter implementation for efficient similarity calculation
  • src/multi-bloom.ts - Multi-resolution bloom filter with adaptive parameters
  • src/settings.ts - Settings tab implementation
  • src/ui.ts - User interface components for related notes view
  • src/styles.css - Custom CSS styles for the plugin
  • src/manifest.json - Plugin manifest file
  • package.json - Project configuration and dependencies
  • esbuild.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:

  1. Validate your plugin against Obsidian's requirements:
npm run validate
  1. 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
  1. GitHub Actions will build the plugin and create a draft release with the required files:
  • main.js
  • manifest.json
  • styles.css
  1. 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:

  1. Force-quit Obsidian completely (not just close the window)
  2. Remove the plugin cache by deleting the cache directory:
    # Navigate to your vault's .obsidian folder and run:
    rm -rf .obsidian/plugins/related-notes
    
    Or manually delete the .obsidian/plugins/related-notes folder
  3. Restart Obsidian
  4. Reinstall the plugin from Community Plugins
  5. The plugin will rebuild its index automatically with optimizations for large vaults

Alternative Recovery (Preserve Settings):

If you want to keep your plugin settings:

  1. Force-quit Obsidian
  2. 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
    
  3. 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:

  1. Check the troubleshooting section above first
  2. Check the GitHub Issues
  3. Create a new issue if your problem hasn't been reported
  4. Use the Copy debug info in the Settings page to get additional details
  5. 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 + i on Mac and ctrl + shift + i for 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:

Buy Me A Coffee

Your support helps maintain and improve this plugin. Thank you! ☕️

Similar Plugins

info
• Similar plugins are suggested based on the common tags between the plugins.
Note Linker
4 years ago by Alexander Weichart
🔗 Automatically link your Obsidian notes.
Crossbow
3 years ago by shoedler
Obsidian plugin to find possible backlinks in your notes
Silicon AI
3 years ago by deepfates
Add some intelligence to your notes with Silicon AI for Obsidian
Cardify
3 years ago by joshuakto
plugin to create individual pages for line separated elements
Semantic Canvas
2 years ago by Aaron Gillespie
An Obsidian Plugin to update note properties using links on Canvases
Weekly Review notes linker
2 years ago by Aditya Khowal and Brandon Boswell
Lookalike
2 years ago by jlweston
Note Linker with Previewer
2 years ago by Nick Allison
Obsidian Plugin to find and Link notes
Suggest Notes
2 years ago by Doggy-Footprint
Add links to current note
6 years ago by MrJackphil
This plugin adds a command which allows to add a link to the current note at the bottom of selected notes
Related Notes Finder
5 years ago by Joshua Michalik
An Obsidian extension that adds extra features for note links, statistics, and randomizers
InfraNodus AI Graph View
2 years ago by Nodus Labs
Advanced graph view for Obsidian: text analysis, topic modeling, and AI with InfraNodus AI text analysis tool: https://infranodus.com
Tag Tactician
a year ago by Scott Tomaszewski
Mention Things
a year ago by Philipp Stracker
Obsidian plugin to use the familiar @-notation or other symbols to trigger linked autocompletions
Send to Canvas
10 months ago by wenlzhang
An Obsidian plugin that allows you to send tasks, blocks, and notes to Canvas files as plain text, links, and embeds.
Related Notes by Tag
9 months ago by Chris Howard
displays notes that share tags with your currently active note
Auto Keyword Linker
4 months ago by Daniel Rhodes
Stop manually typing [[brackets]] around recurring terms. Configure keywords with variations once, and automatically link them as you write or across your entire vault.
Connections
4 months ago by Eric Van Cleve