Backlinks pane search : incorrect search results

Steps to reproduce

  1. So, let’s say in daily note, we have the following :
  • [[ProjectA]] #meeting
    • lorem ipsum
    • lorem ipsum
  • [[ProjectB]] lorem ipsum
  • [[ProjectA]] #idea lorem ipsum
    • Lorem ipsum
  1. If we go to the backlinks pane of Project A, we will get the following :

Name of the daily note

  • [[ProjectA]] #meeting
    • lorem ipsum
    • lorem ipsum

  • [[ProjectA]] #idea lorem ipsum
    • Lorem ipsum
  1. Now, if we would like to get only the backlinks related to #meeting, we would search, in the backlinks pane :

tag:#meeting

Expected results

We should get the following results :

Name of the daily note

  • [[ProjectA]] #meeting
    • lorem ipsum
    • lorem ipsum

Actual results :

Name of the daily note

  • [[ProjectA]] #meeting
    • lorem ipsum
    • lorem ipsum

  • [[ProjectA]] #idea lorem ipsum
    • Lorem ipsum

Discussion

Not sure why, but is seems that currently, search/filter in the backlinks pane is made at page level, not block level ! So, as long as there is a #meeting in the same page as [[ProjetA]] #idea, it will appear as search result in the backlinks pane.

What I would like is to only find every block containing [[ProjetA]] and #meeting.

A workaround could be :

block:([[ProjectA]] #meeting)

But it unfortunately returns :

Name of the daily note

  • [[ProjectA]] #meeting
    • lorem ipsum
    • lorem ipsum

  • [[ProjectA]] #idea lorem ipsum
    • Lorem ipsum

And not :

Name of the daily note

  • [[ProjectA]] #meeting
    • lorem ipsum
    • lorem ipsum

For the same reasons supposed above, that is :

search/filter seems to be made at page level, not block level !

So, as long as there is at least one block containing both [[ProjectA]] and #meeting in a page, all [[ProjectA]] occurrences of that page will appear in the backlinks pane of [[ProjectA]].

EDIT :

In addition to that, it seems that in the main search (and not in the backlinks pane search),

block:([[ProjectA]] #meeting)

Will properly return :

Daily note name
-[[ProjectA]] #meeting

(But unless you expand, results are without additional context as in the backlinks pane :

Daily note name

  • [[ProjectA]] #meeting
    • lorem ipsum
    • lorem ipsum

)

So it really seems we are close to getting block-level search in the backlinks pane, either by using block:() or filter through an inline tag #meeting.

Related feature request

Tag is page level operator. So that’s not a bug.

We’ll think about the behavior of block/task/line.

@WhiteNoise : Thanks for your comment!

Tag was an example, but it could be another filter method, e.g. :

Daily note includes :

  • [[ProjectA]] [[@PersonA]] lorem ipsum
    • Lorem ipsum
  • [[ProjectA]] [[@PersonB]] lorem ipsum

In the backlinks pane, of [[ProjectA]], if I search for [[@PersonA]], I will get :

  • [[ProjectA]] [[@PersonA]] lorem ipsum
    • Lorem ipsum
  • [[ProjectA]] [[@PersonB]] lorem ipsum

And not :

  • [[ProjectA]] [[@PersonA]] lorem ipsum
    • Lorem ipsum

Because search/filter in the backlinks pane is made at page level, not block level.

So no matter how we filter in the backlinks pane (by a tag, a word, a link, etc…), it will include all backlinks, as long as there is “tag”, “word” or “link” in the same page as it, not only the same block as it.

Did you also had that in mind when you said :

We’ll think about the behavior of block/task/line.

If so, this is a wonderful news ! :smiley:

I understand what you want.
That’s not the way search/backlinks work and we should keep this part as Feature Request.

However your post made me realize that there may be something wrong with the way line/block/task are processed in some circumstances (in backlinks or regular search). We’ll think about this.

1 Like

@WhiteNoise Thanks again, I’m looking forward to hearing any advancement on that topic :wink:

We will likely introduce some form of block level filtering in the future.

Here’s the current ideas: https://forum.obsidian.md/t/ideas-for-improving-the-backlink-pane-filtering-block-level-filter/31178

For now, everything is page level. I am going to close this bug report.

1 Like

Wonderful, thanks a lot :blush: