An advanced semantic search plugin for Obsidian that enables AI-powered content discovery using offline embedding models. Find notes by meaning, not just keywords.
- π§ Semantic Search: Find content by meaning using state-of-the-art embedding models
- π± Offline Operation: Runs entirely offline with pre-bundled AI models
- β‘ Real-time Updates: Search reflects file changes within 30 seconds
- π― Smart Chunking: Intelligent text segmentation for better search granularity
- π·οΈ Tag Integration: Full support for Obsidian tags and frontmatter
- π Multiple Interfaces: Search view, quick modal, and status bar integration
- π Performance Optimized: Handles 100k+ lines with scalable performance
- Download the latest release from GitHub
- Extract to your Obsidian plugins folder:
VaultFolder/.obsidian/plugins/semantic-search/ - Enable the plugin in Obsidian Settings β Community Plugins
- Wait for initial indexing to complete (shown in status bar)
Search View: Click the brain icon in the ribbon or use Ctrl+Shift+S (Cmd+Shift+S on Mac)
Quick Search: Use command palette β "Semantic Search: Quick Search" or Ctrl+Shift+F
Example Searches:
- "project management methodology" β finds content about Agile, Scrum, planning
- "debugging techniques" β discovers troubleshooting approaches across notes
- "meeting notes from last week" β locates recent meeting documentation
Access settings via Settings β Semantic Search Plugin:
- Auto-index on startup: Automatically rebuild index when Obsidian opens
- Index update interval: How often to check for file changes (default: 30 seconds)
- Chunk size: Text chunk size for embedding (default: 500 characters)
- Chunk overlap: Overlap between chunks (default: 50 characters)
- Maximum results: Number of search results to display (default: 20)
- Similarity threshold: Minimum similarity score for results (default: 0.3)
- Enable tag filtering: Include tag-based filtering in searches
- Snippet length: Length of preview snippets (default: 150 characters)
- Batch size: Number of files to process simultaneously (default: 10)
- Memory limit: Maximum memory usage for indexing (default: 500MB)
- Background processing: Use web workers for non-blocking operations
- DocumentIndexer: Manages vault indexing and file processing
- SemanticSearchEngine: Handles embedding generation and similarity search
- FileWatcher: Monitors file changes for real-time updates
- IndexStorage: RxDB-based local storage with horizontal partitioning
- EmbeddingEngine: Transformers.js integration for offline AI models
- Indexing: Files β Chunks β Embeddings β IndexedDB
- Search: Query β Embedding β Similarity Calculation β Ranked Results
- Updates: File Change β Re-embedding β Index Update
Uses all-MiniLM-L6-v2 quantized model (384 dimensions):
- Size: ~23MB bundled with plugin
- Language: Optimized for English text
- Performance: ~100ms per embedding on modern hardware
- Quality: State-of-the-art sentence similarity
| Vault Size | Initial Index | Update Time | Search Time | Memory Usage |
|---|---|---|---|---|
| 10k lines | 30 seconds | 5 seconds | 200ms | 50MB |
| 100k lines | 5 minutes | 30 seconds | 500ms | 200MB |
| 1M lines | 30 minutes | 60 seconds | 1000ms | 500MB |
- Exclude large files: Use
.obsidian-search-ignoreto skip binary/large files - Adjust chunk size: Smaller chunks = more precise search, larger chunks = better context
- Tune similarity threshold: Lower values = more results, higher values = more precise
- Enable background processing: Prevents UI blocking during large operations
node --version # v16+ required
npm --version # v7+ required# Clone and install
git clone <repository-url>
cd obsidian-semantic-search
npm install
# Development build
npm run dev
# Production build
npm run build
# Run tests
npm test
# Run performance tests
npm run test:performance
# Lint code
npm run lintsrc/
βββ models/ # Data models (Document, Chunk, Tag, etc.)
βββ services/ # Core services (Indexer, Search, Storage)
βββ ui/ # User interface components
βββ workers/ # Web Workers for background processing
tests/
βββ unit/ # Unit tests for utilities
βββ integration/ # Integration tests
βββ contracts/ # Interface contract tests
βββ performance/ # Performance validation
specs/
βββ 001-obsidian-search-plugin/
βββ spec.md # Feature specification
βββ research.md # Technical research
βββ contracts/ # TypeScript interfaces
- Define Interface: Add contracts in
specs/001-obsidian-search-plugin/contracts/ - Write Tests: Create failing tests following TDD approach
- Implement Model: Add data models in
src/models/ - Create Service: Implement business logic in
src/services/ - Build UI: Add interface components in
src/ui/ - Integration: Wire components in
main.ts
- Contract Tests: Verify interface compliance
- Unit Tests: Test individual utilities and functions
- Integration Tests: Validate component interactions
- Performance Tests: Ensure scalability requirements
"Indexing failed" error:
- Check available disk space (needs ~500MB for large vaults)
- Verify file permissions in vault folder
- Check browser console for detailed error messages
Slow search performance:
- Reduce similarity threshold in settings
- Enable background processing
- Close other resource-intensive applications
Missing search results:
- Wait for indexing to complete (check status bar)
- Lower similarity threshold
- Verify files contain searchable text content
High memory usage:
- Reduce batch size in settings
- Enable background processing
- Restart Obsidian to clear memory
Enable debug logging in settings for detailed troubleshooting:
// Browser console
localStorage.setItem('semantic-search-debug', 'true');- Issues: Report bugs via GitHub Issues
- Discussions: Join community discussions on GitHub
- Documentation: Visit plugin wiki for advanced guides
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
- Fork the repository
- Create feature branch:
git checkout -b feature/your-feature - Make changes following coding standards
- Add tests for new functionality
- Ensure all tests pass:
npm test - Submit pull request with detailed description
- TypeScript: Strict mode enabled, all types explicit
- ESLint: Use provided configuration
- Testing: TDD approach, 80%+ coverage
- Documentation: JSDoc comments for public APIs
- Performance: Consider impact on large vaults
MIT License - see LICENSE file for details.
- Offline semantic search using Transformers.js
- Real-time index updates within 30 seconds
- Support for 100k+ line vaults
- Multiple search interfaces (view, modal, status bar)
- Comprehensive test suite and performance validation
- Full Obsidian plugin integration
- Transformers.js for offline AI models
- RxDB for reactive database functionality
- Obsidian for the excellent plugin API
- Sentence Transformers team for the embedding model