3

It would be useful, for various reasons, to search for posts with certain numbers of comments. A search operator could allow for searches like comments:0 to search for posts with no comments, comments:1 for posts with exactly one comment, comments:..5 for posts with 5 or fewer comments, or comments:15.. for posts with 15 or more comments.

Example use cases:

  • [tag] created:3d.. is:q comments:0 answers:0 to try to find recent questions that have not gotten enough attention and could use either 1) a comment suggesting clarification, a duplicate, etc., or 2) an answer
  • [tag] created:..330d comments:..1 answers:0 would find questions heading for roomba in the next few weeks that might contain comments that should have been written as an answer, in order to convert those comments to proper answers and prevent that knowledge from being lost
  • comments:15.. to search for posts that may have overcluttered comments sections in need of some cleanup (there are some related autoflags, but they have pretty high thresholds)
10
  • 1
    Cross-site duplicate: meta.stackexchange.com/questions/315296/…
    – rene
    Apr 12, 2023 at 17:29
  • Convince me. What are these "various reasons" you speak of? Moderation purposes?
    – Makoto
    Apr 12, 2023 at 17:55
  • 1
    @Makoto I've given several example use cases; do you think those aren't compelling?
    – Ryan M Mod
    Apr 12, 2023 at 17:58
  • I'd also like to see a comments: <string> for in comment string matching.
    – Kevin B
    Apr 12, 2023 at 17:59
  • 2
    @KevinB I think that's a very different and probably larger-scope request, though I'd also like that. It would be quite useful for comment moderation (and for finding the horribly incorrect custom close reasons people sometimes use).
    – Ryan M Mod
    Apr 12, 2023 at 18:05
  • 1
    @RyanM: I mean, not really. Comments don't really matter in the grand scheme of Q&A, so if a question has any number of comments but no answer, it should probably be answered at some point. For questions that are Roomba eligible I'm barely more convinced that this is a useful use case, but...I dunno.
    – Makoto
    Apr 12, 2023 at 19:06
  • 1
    @Makoto the theory would be that questions with comments but no answer may already have been "answered" by comments that should have been an answer, but were posted in the comments section instead. The general advice is to convert those to answers. t's not something I've personally spent time doing, but it could be useful. I have, in searching for questions where the comments were the only thing preventing roomba deletion (you can filter for every other criteria, so if it's not deleted it must be because of comments), seen quite a number that had an answer-like response in the comments.
    – Ryan M Mod
    Apr 12, 2023 at 19:12
  • See the convincing (if you read them fully) comments from here: meta.stackoverflow.com/questions/424137/…. Apr 12, 2023 at 19:26
  • @RyanM: I'm not exactly sold. The value of comments is still nil, and they're not searchable by design, so if someone misuses the platform to answer a question in comments, then...well, we all lose. I don't think that entrusting us mere mortals to fix that issue is the right way to go, since we get things wrong and we're basically transcribing "answers" down from comments. If we can't get people comfortable with transcribing images because they can't feel safe about how 'right' their work is, I don't know how comfortable the masses would be with doing this in comments...
    – Makoto
    Apr 12, 2023 at 19:41
  • 6
    Frankly, I'd like to have such an operator in place. Despite the value of comments from a normal user standpoint is [well, should be] debatable, curation often calls for a comment search. So far I've been resorting to a SEDE query and dedicated bots, both having well-known drawbacks. Apr 12, 2023 at 21:37

0

Browse other questions tagged .