Add search box in backlinks pane for filtering

I would like to see the backlinks pane have the search pane embedded (one for linked mentions and one for unlinked mentions) so that whatever you put in the search bar would be appended to the search for linked and unlinked mentions. We would get the full search functionality to filter backlinks and search results would be backlink results so you get the collapse feature.

Then as new features are added to search, they would be available to backlinks.

21 Likes

+1 for this feature.

Most of my workflow involves opening the backlinks to understand the context. Any filters to narrow the backlinks will make my job easier

3 Likes

Hey I’m working on a fix for this using Regex searching. @verma Could you tell me a specific use case so that I can test my method and post it here soon?

I mostly check for other words or backllinks which appear near my main backlink

For instance when I’ve opened backlinks for [[water]]

I would like to search if things like:

  • [[pH]]
  • Acidic
    Also appear in the same block where [[water]] appears.

Hope this is easy to understand :sweat_smile:

@verma So it is possible to do this with search. You could search for [[water]] [[pH]] and get the same result as if you were filtering the backlinks pane. If you have spaces in your links, you would need to wrap them in quotes.

The only problem with this approach is that it would match from all over the note (not just from the same block/sentence)

1 Like

That’s a good point, but this is going to be a problem regardless because Obsidian doesn’t recognize “blocks”.

Also appear in the same block where [[water]] appears.

The following regex search string will search for things from the same sentence (not blocks, but I hope it might still be helpful). By the same sentence, I mean continuously typing without pressing the ‘Return’ key.

I created a sample page.

image

I did the following search.

/ (?=.*?\[\[water)(?=.*?acidic)

And there was a hit !

image

If I split the sentence such that [[water]] and [[acidic]] are not part of the same sentence (paragraph/block), you don’t get any results (which is what we are looking for)

image

image

You can also add more terms to the search or do boolean operation in this. Let me know what you think @verma

2 Likes

yes, by one block I meant one paragraph so no return key

I am still totally new to the regex world, but yes I tried replacing the words and I could hit most of the matches, so that’s a wonderful start to be frank !

maybe I will try some more of this myself and then I should be able to address you properly. :sweat_smile:

1 Like

@1stprinciples Thank you for the regex! My regex skills are not great either.

I don’t expect Obsidian to offer this level of search granularity in the core syntax, but perhaps this could be supported by future plugins.

1 Like

Let me give a quick breakdown of what I have done.
/ signifies the start of the regex syntax
(?=.*?\[\[water) - This is the first block. In this block, anything after the second question mark is what we are searching for. \[\[water basically means [[water. Those back slashes are used to escape the [ character since those characters have meaning in regex.
(?=.*?acidic) - This is the second block. This contains the second word in our search term. In this case, it is acidic.
Note that you can add more blocks to include more words, for instance,

/ (?=.*?\[\[water)(?=.*?acidic)(?=.*?pH)

The above statement would do an AND search using the three terms we have specified. We could also use OR as follows,

/ (?=.*?\[\[water)|(?=.*?acidic)|(?=.*?pH)
1 Like

Related feature requests:

1 Like

I think copy backlink (query) to search can be another good solution. Then we can add other queries/filters we look for.

Use case or problem

I would like to exclude certain folders within Backlinks Panel. e.g. Daily Notes, Journal, etc.

Proposed solution

Filter option within Backlinks Pane similar to options within Graph pane

Current workaround (optional)

none that I know of

Related feature requests (optional)

This will be implemented in 0.11.10

1 Like
  • Backlinks and unlinked mentions can now be filtered using a search query.

How would one exclude/include Folders? Couldn’t find reference in Help (or anywhere else).

the same way you do in regular search.

Is (YAML) Aliases one of the operators (like #Tag) that can be used in search queries? I do not see it specifically mentioned in the Help vault.