Is there a way to search for notes not linked in a certain Note (MOC)

I don’t see a way to do that in the built-in search. Search - Obsidian Help

Maybe there’s a plugin?

Ok, thanks anyway for the reply

If there isn’t a plugin, I imagine it would be a simple one to make for someone who knows how to make plugins generally.

That’s true. Perhaps its something that others might find useful too.
However I actually don’t know how to search the plugins in a way where I would
find the one who did exactly this if there is one. Any advice on that?

It may not be exactly what you’re looking for, but I’ve seen

mentioned a few times. It seems to have a bunch of settings options. Perhaps a start?

How do you consider a page to be relevant for a MOC (when its not linked into the MOC), are you talking about every page not linking to that particular MOC?

Or are you talking about any page not linking to any of your MOC pages? (Which renders the questions of how are your MOC pages organised/tagged, and wouldn’t we still be talking about a lot of pages, so how do you foresee limiting down “all-the-other-pages” to only those relevant? )

I think they just want all pages that fulfil the search that is not linked by the current note (the MoC). This may sometimes be an unmanageable number of pages but it might not, they could have few pages in general or could just use a more specific if there’s too many results.

Pretty niche but a simple toggle to exclude results from pages that link to current note would be neat for me as well. Sometimes I search a term and realise it is being used in two completely unrelated contexts with two different meanings and with this I could quickly find those notes if I wanted to remove that term to reduce confusion. I’ve ended up doing this a few times and this could make it easier so I would appreciate this.

Exactly. I want to be able to search for notes using all the functionality that already excists, and then after that just add this part which excludes search results that I have already found and added to the MOC

I don’t know if this has been mentioned already, but if you’re using wiki links, wouldn’t doing -content: "[[MOC" eliminate search results already linking to your MOC? (Possibly you could use just -"[[MOC", and/or need to escape the square brackets)

In essence what you’re searching for are pages without a link to the MOC in question, so then eliminate the link text from the search. Or am I missing something basic again?

Holroy’s got it.
So if the file name starts with MOC, -/[[MOC.*?]]/ should work.
I just checked on a file of mine and the first 3-4 files I checked on the list of my backlinks did not appear among the search results. So it’s good.

  • I’m slightly suprised that a few of my last searches when using the /<searchterm>/ format went through without having to escape the square brackets… Since when has this been supported?
    Anyway, if the user has issues, try this: -/\[\[MOC.*?\]\]/

I deliberately left out the ending square brackets to allow for aliases to be used, and didn’t use regex matches to hopefully avoid escaping those brackets.

But the gist of the idea is the same, do not match against actual links to the MOC name you’ll want to exclude.

No, they want to filter out results from notes which the MOC links to. So if the MOC contains a link to the note, it is excluded from the search results.

1 Like

I’m really off my game lately, and my idea does go the other way around removing those files linking to the MOC, not those linking from the MOC. I’ll now go to the corner, stand quiet and rust for a while. :upside_down_face:

1 Like

It happened to gino_m, too — must be something in the air! :wink: (Also I feel like I didn’t see you around for a bit — nice to see you again!)

1 Like

I find Graph View with Show Orphans useful for this kind of thing. You can use the same search syntax. Hover Editor makes it fast to decide whether to link a note to your moc or not.

1 Like

Well, I reserve the right to be wrong. :slight_smile: And it’s the air, all right. I’ll open a window.

If I understood the replies correctly we still dont have a solution. But thanks alot everyone for the support and attempt here.

This similar question seems to have found an answer. It only applies to notes that link to the note you’re looking at, but I think it can be adapted.

(I would have posted it here sooner but wasn’t able to find my way back to this thread until your post put it in my notifications.)

1 Like

thanks! I will check it out

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