Advanced graph querying methods. E.g. exclude nodes connected to a specific node

I need to hide all files connected to a specific file or a file with a specific property in the graph view.

When I take notes on books I often create 1 note for the book and many (often 100s) of files for different “concepts” in the book I found interesting. I make sure the all my “concept” notes are connected to the “book_name” note. So for example if I’m reading “Thinking fast and slow” I would create a page “Book/Thinking Fast and” where I would review and summarize the book. I would also have many floating pages like “Lizard brain”, “System 1” and “Anchoring” all linking to the book page.

The problem is that when I switch to graph view the huge number of “concept” nodes drown everything else, for example my work related notes. I can’t filter them out, because the only thing that’s particular about them is that they are all connected to a specific book. Besides that they are like my regular notes, they sit in a general folder and are not different than my daily notes or work or personal notes.

Is it possible to query against Obsidian’s graph directly using any of the graph languages like SPARQL? If so I can see 2 types of queries I can use:

  1. I can exclude nodes based on explicit connection, e.g. “return all ?node where a node is not connected to [node_1, node_2 … node_n]”. [node_1, node_2 … node_n] is a list of my book_name files.
  2. I can exclude nodes based on an attribute (e.g. tag) of the book_name file. E.g. “return all ?node where a node is not connected to tag=”#book".

Without queries which can use node connections I can create a tagging system where I would use tags which are basically book names. Then I would exclude nodes based on the tag. This approach seems super clunky (e.g. tag names get super long and I can’t use spaces, I have to use tags instead of connections when the concept belongs to multiple books, etc). It also seems like it’s not philosophically aligned with how Obsidian seems to think of tags as attributes of files.

Is something like this possible with obsidian or any of its plugins?


I have a similar issue in my mind about a project that I haven’t started yet. I intend to scan a big book and either use OCR (optical character recognition) or very very tediously use copying/pasting (I have both physical and digital versions of this book), but I want to ensure, when the time comes, that the book notes won’t overlap with the notes from my main vault. I figured I’d just create a separate vault. Not sure if creating multiple vaults is an option for you or if that doesn’t/wouldn’t address the problem you’re envisioning…

1 Like

a separate vault would be very inconvenient since concept notes are not meant to belong exclusively to a book (in that case I would’ve just included them as headers in the book’s page). I want the concepts to connect multiple books, connect to other concepts, including in my personal/work life. If there is a separate vault I would probably end up creating duplicates of concepts in both.

1 Like

It sounds like the concept notes all contain the text [[linkToBookName]]? Do such links all start with [[Book/? If so, could you use the existing filter option to exclude that text? Or is there any other text in common to your concept files that you could use to filter them?

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.