(Bug) Searching tags with "All the above tags" does not fully match tags

Description

Searching tags using “All the above tags” (AND) does a substring match instead of a full string comparison when returning search results.

Ex. tags:vr+the-handy
Shows tags with “the-handy” and “non-vr” and “vr” when it should be returning results with only "the-handy’ and “vr”.

From what I’ve seen, this only affects tags that appear as a substring of another tag.
I’d imagine the backend query for this search would be something along the lines of WHERE Tag LIKE '%the-handy%' AND Tag LIKE '%vr%'. Which would return topics/posts that are tagged as “vr” and “non-vr”.

That seems like a discourse bug.
Report that on their github

Using the “tags:” search term does indeed not work as expected.
A more reliable way to search tags is like this:
#vr #the-handy
You can further use -tag:non-vr to exclude posts with both tags (like vr conversions) or -tags:tag-a,tag-b to exclude several tags. Seems to work properly.

1 Like

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