No description
Find a file
2025-01-10 22:13:53 +05:30
.editorconfig First commit 2025-01-10 22:13:53 +05:30
.eslintignore First commit 2025-01-10 22:13:53 +05:30
.eslintrc First commit 2025-01-10 22:13:53 +05:30
.gitignore First commit 2025-01-10 22:13:53 +05:30
.npmrc First commit 2025-01-10 22:13:53 +05:30
esbuild.config.mjs First commit 2025-01-10 22:13:53 +05:30
main.ts First commit 2025-01-10 22:13:53 +05:30
manifest.json First commit 2025-01-10 22:13:53 +05:30
package-lock.json First commit 2025-01-10 22:13:53 +05:30
package.json First commit 2025-01-10 22:13:53 +05:30
README.md First commit 2025-01-10 22:13:53 +05:30
styles.css First commit 2025-01-10 22:13:53 +05:30
tsconfig.json First commit 2025-01-10 22:13:53 +05:30
version-bump.mjs First commit 2025-01-10 22:13:53 +05:30
versions.json First commit 2025-01-10 22:13:53 +05:30

Obsidian Vector Search Plugin

This plugin adds semantic search capabilities to Obsidian using Ollama's embedding API. It allows you to find semantically similar notes based on content rather than just keyword matching.

Features

  • 🔍 Semantic search across your entire vault
  • 🤖 Powered by Ollama's embedding model
  • 📊 Configurable similarity threshold
  • 🚀 Fast local search once embeddings are generated

Prerequisites

  • Ollama installed and running locally
  • The nomic-embed-text model pulled in Ollama

Installation

  1. Clone this repo to your .obsidian/plugins/ folder
  2. Install dependencies: npm install
  3. Build the plugin: npm run dev
  4. Enable the plugin in Obsidian's settings

Usage

  1. Initial Setup

    • Go to Settings > Vector Search
    • Configure your Ollama URL (default: http://localhost:11434)
    • Set your desired similarity threshold (0-1)
  2. Building the Index

    • Click the vector search icon in the ribbon
    • Wait for all notes to be processed (progress will be shown)
  3. Searching

    • Select any text in a note
    • Use the command "Find Similar Notes" (or set up a hotkey)
    • View results in the popup modal

How it Works

  1. The plugin creates vector embeddings for all your markdown notes using Ollama
  2. When you search, it:
    • Creates an embedding for your selected text
    • Uses cosine similarity to find the most similar notes
    • Shows results above your configured threshold

Development

  • npm run dev - Start compilation in watch mode
  • npm run build - Build the plugin
  • npm test - Run tests

Logs

The plugin logs all API calls and operations to the Developer Console (Ctrl+Shift+I or Cmd+Option+I on Mac). This includes:

  • Embedding API requests
  • Index building progress
  • File processing status
  • Any errors or issues

Configuration

{
	"ollamaURL": "http://localhost:11434",
	"searchThreshold": 0.7
}