Have searched the Obsidian forum under Graph-view but have been unable to find a solution to my problem above.
What I’m trying to do
My embedded images are located in the vault in the attachments sub-folder. I also have my notes in yet another sub-folder. When filtering the graph-view I restrict it to my notes sub-folder and do NOT have attachments toggled on and yet all the embedded images within the notes are displayed in addition to the notes themselves. Is there a way that I can exclude the images please?
Thanks but no joy. I tried path:"125 Sources" and -path:"999 Attachments", but the Graph-view still includes my images from the “999 Attachments” folder.
https://help.obsidian.md/Plugins/Search
Please take a look at this. You’re using and which should just be a space. Sorry that I didn’t realise that earlier.
Then it should work.
I’m just going to swing the bat and hope I hit something, @Carriolan and @koala. But I don’t think this is correct. The operators AND and SPACE are the same. From the help page:
Boolean operations can be used. Use OR to match one or another. Use - to negate a query. The space character is used for boolean “and”.
I’m thinking the PATH solution was correct, but the syntax wrong. Instead of:
path:"125 Sources" and -path:"999 Attachments"
It should be:
path:"125 Sources" and path:-"999 Attachments"
Even a broken clock is right twice a day, so I have hope! Or maybe it’s just path:-"999 Attachments" alone.
Well, @Carriolan. I did some more digging. I’m not sure why turning your attachment folder off doesn’t work. So, I turned mine on and fiddled with those queries. I found that for me, the following query excludes JPG’s and PNG’s:
file:-".jpg" and -".png"
Hopefully, it’ll work for you. Otherwise, we’ll keep thinking.
Also, if that doesn’t work (and this is kind of obvious, just checking the boxes off) but you did actually SET the attachment folder by right clicking it and clicking Set as Attachment Folder, then confirming it in settings, under files and links, that the folder path is correctly set, right?