8

Based on the existing advanced search options, I expected a comments:# to exist so I can search posts depending on the number of comments they have applied to them; at worst, I expected a hascomments. Either I missed them, or neither exists.

Is there a reason search posts by number of comments doesn't exist beyond it simply not having been implemented yet? If no, then please consider this a request to implement the functionality.

This is different from the search comments requests, which request solutions for searching within comments themselves. This question asks for the ability to search by number of comments.

  • not against this, just curious why you'd want this capability? – Daniel Aug 12 '13 at 17:33
  • Tumbleweed hunting. – JoshDM Aug 12 '13 at 17:34
  • 4
    To elaborate, many questions have no answers, but are being worked via the comment system, and might not need any additional eyes. This would help find questions that are being ignored from both the answer and comment aspects. Hence the reference to "hascomments" as an alternative option. – JoshDM Aug 12 '13 at 17:36
  • 2
    In the place where Advanced Search fails, Data Explorer comes to the rescue. :-) – Shadow Wizard is Ear For You Aug 12 '13 at 17:45
  • 2
    In the place where you broke your hammer, hit it with your wrench turned sideways. :-) – JoshDM Aug 12 '13 at 19:53
  • I wish this question had been taken seriously. I'm looking for a proper answer. – rhermans Jul 31 '18 at 20:23
  • I was too, unfortunately we got derp. – JoshDM Jul 31 '18 at 20:24
  • 3
    I would have loved an answer to this, too. I would love to search for questions that have zero score, no answers, and two or more comments - because these are not auto-deleted see point 10 on this list, but very likely are candidates for such deletion, in which case one can cast a single downvote to push them over the deletion edge (point 9 in the list of auto-deletions). It's a pity this is impossible. Searching just on the first two criteria at CV gives over 16,000 hits. – Stephan Kolassa Sep 18 '19 at 10:17
4

To me it seems like the Comments table has information about the parent PostId such that we can make it work like this:

SELECT TOP(##num##)
  COUNT(a.Id), a.PostId AS [Post Link], b.Score
FROM Comments a inner join Posts b ON b.Id = a.PostId 
WHERE a.creationdate >= '8/1/2010'
GROUP BY a.PostId, b.Score
ORDER BY COUNT(a.Id) DESC

https://data.stackexchange.com/stats/query/1110781/posts-with-highest-number-of-comments


I see now that it is not about searching the posts by sql but instead by using the search function. Well, anyway, now there is this workaround.

  • 1
    +1, It would be nice to be able to specify only questions, only answers, or both (current version), & to be able to constrain results to a score or date range, given the reason for this request. – gung - Reinstate Monica Sep 19 '19 at 15:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .