La recherche par tags multiples supporte-t-elle AND versus OR ?

Je pense qu’il y a un bug lors de la recherche avec plusieurs étiquettes. Voici le résultat étrange que j’ai obtenu sur mon Discourse :

img src=“//assets-meta-cdck-prod-meta.s3.dualstack.us-west-1.amazonaws.com/original/3X/9/d/9d9e5d0ba84892a132ca1505ed87d1e7deb222b4.png” width=“690” height=“428” e

D’après la recherche, il devrait y avoir 8 résultats. Mais il en affiche 9. Le deuxième résultat est correct, mais pas le premier.

Je me demande si le problème vient du trait d’union, puisque le résultat erroné contient aussi une balise a qui inclut certains des termes de recherche (-reports). Le problème n’apparaît pas lorsque la recherche est uniquement pour committee-reports.

I might be reading this wrong, but wouldn’t this simply imply the topic only needs to contain one of the provided tags?
https://github.com/discourse/discourse/blob/0a78ae739d0b14b6bfc2654c51be5907c28d3f8f/lib/search.rb#L393-L402

Or am I reading that incorrectly?

5 « J'aime »

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?

1 « J'aime »

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

1 « J'aime »

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.

2 « J'aime »

@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

7 « J'aime »

Hi,
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?
Thanks.

1 « J'aime »

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.

5 « J'aime »

Thanks for pointing out to this helpful workaround @cpradio!

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?

1 « J'aime »

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

3 « J'aime »

https://github.com/discourse/discourse/pull/4896

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

10 « J'aime »