Hide from search

What I’m trying to do

I need to hide some words from search. For example I have note which so many notes refers to… When I try to find this note I see all the notes which has links to it.
Is it possible to hide word/link from search something like (nosearch)[[Main]] in the note.

Things I have tried

If you’re searching for a note by name I recommend using the Quick Switcher. Quick switcher - Obsidian Help

But in search you can use file:example (for a note named “example”). That will search only the names of notes and not their contents. Search - Obsidian Help

Thank you. I am talking about a different thing. Picture that I have template for Company - Name, Phone, Address, etc. I have hundreds of companies with filled data. I search for ‘Company’ and see hundreds of results. But it if I can for example set (nosearch)Company in template so I can get only necessary notes…

To single out a word and not include that word from the search I don’t think of possible. I can however think of two alternatives:

  1. Replace the word you don’t want to find, use a synonym if possible
  2. I’m assuming the false hits are from a template, but anyways change the word where you don’t want it to appear in search results to include a invisible character which effectively makes it not a hit for your search (like zero-width space, ​, or copy that character from somewhere)

The problem is that searches apply to the whole note — so if you exclude something it excludes the note from search results, even if it matches the other thing you’re looking for.

Possibly a regular expression would help — if you have Company: Example, Inc. in many notes and want to avoid matching it while searching the word “company”, you could search for /company[^:]/ — that means the word “company” followed by any character except :. (There’s a better way to do this but I forget the syntax and it’s harder to type; it’s called “lookahead” and it lets you look for something that comes before something else without including the something else in the match. But the expression above is probably good enough for most uses.)

If you’re searching for “Example, Inc” you’d do something similar: /[^(: )]Example, Inc/(I think — haven’t tested, might need adjustment).

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