How to search for all notes linked and backlinked to a note

How is it possible to search for all notes linked and backlinked to a single note?
My final purpose is to navigate all notes related to a specific “MOC note” to a folder (or maybe a new vault). Since they are a lot of notes, I would like to automate the process. Maybe is there a way to achieve this through regex? I’m quite illiterate with regex search, so I’d be grateful if you can help me here.

3 Likes

I have the same question. Hopefully a regex guru can step in here.

Isn’t it possible just by looking into note content and backlinks pane?

This would not be enough, because the search should include also the notes linked to notes linked to notes linked to notes etc. ad infinitum linked to the original note.

OK so you essentially want to find “connected component” of the graph.

In Obsidian such “recursive queries” should be easy to do in Neo4j Graph View Plugin. It will allow to treat links as directed or bidirectional as needed.

There is a function in note options that does something like that. When you press a button with 3 dots at the corner of a note, you can then press “Open local graph” button. It will show the graph that not only shows the links to the files from the note but also the links going to the note itself.