Obsidian graph filtered by search query instead of displaying entire vault

Subject: Obsidian graph filtered by search query instead of displaying entire vault

I am building a large knowledge base in Obsidian for studying Chinese herbal medicine, including a full Materia Medica of herbs and formulas. My notes contain extensive parent–child relationships such as:

  • Herb → actions (e.g., cools blood, generates fluids, drains dampness)

  • Herb → categories (e.g., herbs that cool blood)

  • Formula → component herbs

  • Formula → therapeutic actions

  • Conditions → relevant herbs and formulas

Because every note links to many others, the global graph quickly becomes extremely dense. As the database grows, the full graph view is becoming visually overwhelming and difficult to use for studying relationships.

What I would like instead is the ability to start from an empty or minimal graph and have the graph populate dynamically based on a search query.

Example use cases:

If I search for “herbs that cool blood,” the graph would show only the notes that match that query along with their linked relationships.

If I search for “herbs that generate fluids,” the graph would display only those herbs and their connections.

The key idea is that the graph should be generated from the search results, rather than always displaying the entire vault and forcing me to visually filter it.

Current behavior:

  • Search shows matching files in the search panel.

  • The graph view still displays the entire vault graph, which becomes increasingly cluttered.

Desired behavior:

  • Run a search query.

  • The graph view updates to show only nodes returned by the search and their relationships.

  • Ideally this could start from a blank graph or filtered graph state.

This would make the graph usable as an exploratory learning tool for studying specific functional relationships within a very large knowledge base.

Hey! I came across your post and totally understand the frustration — the global graph becomes unusable once your vault has enough interconnected notes.
I ran into the same problem, so I built obsidian-graph-query — a skill that lets AI coding agents run targeted graph algorithms directly on your vault’s link structure via
Obsidian CLI. Instead of staring at the entire vault graph, you query only what you need and get back structured results.

A few examples mapped to your use cases:

  • “Show me herbs that cool blood and their connections” — neighbors query starts from a specific note and traverses outward N hops, returning only the related herbs and their
    linked actions/formulas
  • “How is herb X related to formula Y?” — path query finds the shortest connection chain between any two notes
  • “Which notes are key connectors?” — bridges query finds notes that are the sole link between different knowledge clusters

Your vault structure (herb → actions, formula → components) is actually ideal for graph queries — the relationships are already encoded as links, which is exactly what the
algorithms traverse.

If you’re using an AI coding agent that supports skills (Claude Code, OpenClaw, Cline, etc.), give it a try. I shared more details here on the forum:

Maybe I’m misunderstanding, but isn’t this how the graph already works? If I enter, for example, rpg into the graph’s search, it only shows notes with the tag “rpg” in the graph. It’s done from the graph’s search bar, though, not the global search bar. Click the gear icon in the upper-right when looking at a graph and enter your search filters there.

1 Like

Yes, but in a large vault the vault/Obsidian freezes.
Unfortunately that’s how it works: global graph shows all nodes/notes and probably even if you filter with searches, the same amount of RAM/CPU goes into the operation as it’d do if you force no render on graph unless there is a search initiated. I just tried with a script (hack as there is no graph API exposed) and no way, Jose on large vaults with too many connections.