How to filter in graph view to show only the notes in the vault directory

As what the title implies, how? But also, so I don’t bother anyone with similar questions in the future, is there like a tutorial/guide that can help us learn the different ways to filter certain notes and notes in folders using Obsidian’s search? Thanks

1 Like

I guess the question could be interpreted as: is there a single search filter term to only show the notes in the root directory? Because, if I understand your linked post correctly, you would have to explicitly exclude all folders by saying path:-"folder1" path:-"folder2" etc. Maybe there could be a search term like path:"/" to do that?

1 Like

In this case, you can use the Regular expressions to get the notes nested at the root folder of the vault:
path:(/.*/) -path:(/\//)

3 Likes

Nice! It’s amazing how you can make incomprehensible text do what you want it to, where did you learn to do that? Thanks!

1 Like

Reading the help docs really helps. For the regular expression, the greatest thing is that it is flexible, like the math, 2+2 = 3, 1+3 =4, 2x2=4, with some tests, you can always find a way to get what you want.

Regexr.com is a great way to both learn and build effective regular expressions. Look at the cheat sheet in the left sidebar for the basics.

2 Likes