Searching / Filtering by multiple tags

Things I have tried

I have tried to select multiple tags in the tag-pane, either directly clicking on them or while CTRL, SHIFT, ALT pressed.

Additionally, I also tried to enter the tag-combination in the search-field; however, the search returns paragraphs / blocks which contain ANY of the tags, but not BOTH.

What I’m trying to do

I am trying to search for note-blocks (paragraphs) which have a certain constellation of tags at the end of the paragraph. Basically, I am trying to replicate the tag search function of Dynalist, where I can filter only notes which have the selected tags defined.

To clarify: I am NOT TRYING to get “#tag1 OR #tag2”, but “#tag1 AND #tag2”.

I cannot believe that this search option is not present. What am I doing wrong?

2 Likes

I think the best way is to use Dataview, very powerful plug-in …

In search field:
tag:#tag1 tag:#tag2
In tag-page, select each tag holding cmd (mac)

5 Likes

Thank you for your help, but as I wrote, this gives me the paragraphs which contain tag1 OR tag2, but not paragraphs which contain both of the tags at the same time.

Thanks for the suggestion. I am intrigued by this plugin, but as I am still “very low on the Obsidian learning curve”, I am hesitant to dive into such a complex plugin. Frankly, don’t know where to start.

Hi, to search for two terms in the same paragraph, use the block search term. In your case, I think the search would be:

block:(#tag1 #tag2)

More search term info: Search

3 Likes

My understanding is that the tag: syntax only works at the document level, which is why you need the above not ‘block:(tag:(tag1 tag2)). That usually catches me out .

That was it! Thank you very much!

1 Like

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