No search results if tags are not exactly in the same order

This needs to be a bug, since users will expect search to work regardeless of the order of tags:

When a block has two tags #tag1 #tag2
The seach will list the block when searching for #tag1 #tag2 but gives no results for #tag2 #tag1.

Hello Yuri_BC,

Did you find a solution to this? I find myself in the same dilemma where I now need to memorize and structure the order of the tags so I may find relevant blocks in the future when performing ad-hoc UI searches. This approach defeats logseq’s so highly advertised of not being document and folder centric - when one has to create hard tag-ordered paths in the blocks.

I hope you did find a solution to this - outside looking for an alternative note/journal system. Please, share if you did, or even if you went to a different solution.

Evernote on the other hand does allow one to search for all documents containing a series of tags (regardless of the order).

Thank you.

@n0tappl13d it’s not convenient but have you tried {{query (and [[tag1]] [[tag2]] ) }} ?

easier workaround: go to page [[tag1]] and filter for [[tag2]] in its linked references.

@WQing,

Thank you for your replies, though perhaps I have understood your answer wrong. When I click on the magnifying glass to perform a search, I typed:

{{query (and [[tag2]] [[tag1]] ) }}

There were not any search results and when I pressed Enter if just went to create a page named:

{{query (and [[tag2]] [[tag1]] ) }}

On the other hand, the second approach does work - pivoting from one tag’s page first and then using the filter function for further tokens.

It would have been nice if the filter method existed as part of the search page too - that would work as well. I am new to logseq, but perhaps the search function is limited to a few results (I don’t have enough blocks yet to confirm) - have not seen if there is pagination, etc.

Thank you!

You need to type that code directly in your notes and once you move the cursor away from that block it will render the results (and they will update automatically in the future) :slight_smile:

1 Like

perhaps the search function is limited to a few results (I don’t have enough blocks yet to confirm) - have not seen if there is pagination, etc.

there is a “more” button at the end of the search results list that will bring you to all results