Create a new block property to exclude block from the search

A block property such as:

search-mode:: default
search-mode:: hidden

I think that this would be useful.

From my own experience, among other things I use Logseq for code snippets and I tag these appropriately.

However as I add more and more code snippets my search has become a bit noisy and difficult to use. As many of my search terms bring up source code from my snippets as they include comments and such, almost every two word combination typed into search is now being dominated with my code snippets.

I’d rather the search not index any source code in any snippet ever, and rather rely on tags for my code snippets and search the entire note for all my other notes.

A simple switch via block properties to exclude this block - but include tags - would make my search more usable again.

Not sure if anyone else is running into this problem.

If anyone knows a way to simply remove all source code snippets from search please let me know!


I’m having the same problem. I would love to exclude code snippets/JSON samples from search results.

I agree that this is needed. For example I want to exclude blocks that contain a template. For example, my daily schedule template in my journal shows up everywere in search and in the referenced pages section.