Does multiple tag search support AND vs OR?


(Alex Armstrong) #1

I think there is a bug when searching multiple tags. Here is the strange result I got on my Discourse:

Based on the search, there should be 8 results. But it displays 9. The 2nd result is correct, but not the 1st one.

I wonder if the issue with the hyphen, since the mistaken result also contains the a tag that includes some of search terms ( -reports). The issue does not appear when searching for just committee-reports.

Tag-union implementation?
Multiple Tags search query takes too long ? - big forum
(cpradio) #2

I might be reading this wrong, but wouldn’t this simply imply the topic only needs to contain one of the provided tags?

Or am I reading that incorrectly?

(Alex Armstrong) #3

I guess it’s late :blush:

Thanks for pointing out what should have been obvious.

Is there a way to search for two tags with AND instead of OR?

(Alex Armstrong) #4

Based on this topic being moved to the #feature category. I take it that’s a no – for now :slight_smile:

(Burke) #5

FWIW, I was just doing a multiple tag search to share a list of posts with someone and expected the search would return the intersection (AND) instead of the union (OR). So, found this post and adding a +1 :thumbsup: for the option to AND multiple tags in a search.

(cpradio) #6

@burke, you can actually do it but it isn’t performant (depending on the number of tags and topics you have)
Multiple Tags search query takes too long ? - big forum

You would specify the tag item multiple times, such as tag:pr-welcome tag:foobar

(Medha Bansal) #7

Outreachy aspirant here :slight_smile: I have successfully installed and run Discourse locally on my machine based on the instructions provided in the Beginners’ development guidelines. I am going through the codebase currently and was trying to get started on a beginner level issue. Is this a good place to start?

(Sam Saffron) #8

I am afraid this is a bit involved, I would pick something a bit more straight forward. PM me with a list of 5 or so features/bugs you find interesting and I will help guide you to the best place to start.

(Alex Armstrong) #9

Thanks for pointing out to this helpful workaround @cpradio!

(Medha Bansal) #10

Thanks for the guidance, I am now looking for issues that I am able to understand/find interesting.
Also, there is a lock icon many of the issues. Does that imply they are not open to all contributors?

(Sam Saffron) #11

Closed topics are topics we are done with, they are completed.

(Jakub Macina) #12

With this pull request now it is possible to do logical AND search by multiple tags and the performance is the same for any number of tags. Example search: tag:pr-welcome+foobar