Skip to content

Wiki links: Add fuzzy matching strategy (middle ground between grep and AI) #1

@dpshade

Description

@dpshade

Problem

Currently wiki link identification has two strategies:

  • Existing notes only (fast): Simple string matching - instant but only finds exact matches
  • All entities via AI (slow): Full semantic analysis - powerful but slow and expensive

There's no middle ground for users who want smarter matching without the AI overhead.

Proposed Solution

Add a third strategy using fuzzy/approximate matching:

Options to explore:

  • fzf-style fuzzy matching: Match note titles with typo tolerance and partial matches
  • Tantivy: Rust-based full-text search engine, very fast
  • MiniSearch: Lightweight JS full-text search
  • Fuse.js: Fuzzy search library

Benefits:

  • Catch common variations (e.g., "JavaScript" matches "Javascript" or "JS")
  • Handle plurals and minor spelling differences
  • Still instant/near-instant performance
  • No API calls required

Implementation Notes

  • Add new WikiLinkStrategy option: "fuzzy"
  • Could use similarity threshold setting (e.g., 0.8 = 80% match required)
  • Consider indexing note titles on vault load for performance

Related

This would complement the existing strategies without replacing them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions