14

Having in mind that you can use title:"text to look up" and body:"text to look up", I tried using:

comment:"text to look up"
comments:"text to look up"

but they do not work. How can I search text in comments?

1 Answer 1

12

Stack Overflow does not provide any direct way to search text in comments. You can try the following two options:

  1. Use StackExchange Data Explorer to search in the Comments database table. You may use this query.
  2. Use Google search and restrict the search using site:stackoverflow.com

You may view your own comments from your profile page and then use browser's search.

To search across all comments, use this SEDE query. SDSE tutorial is available here. Acknowledgement to rene for the above links.

7
  • I'm interested in point 1, but I cannot pass the UserID bit. Any help guide on how to use that site?
    – luchonacho
    Commented Sep 2, 2016 at 10:41
  • @luchonacho every user has an unique id. Click on any user profile and you'll see an id similar to this on the search bar :) Commented Sep 2, 2016 at 10:49
  • 1
    @luchonacho see this query and you might go over the SEDE Tutorial
    – rene
    Commented Sep 2, 2016 at 10:51
  • Oh, I see. But that implies running a search on one user at a time. I was thinking on a more comprehensive, faster approach. I might try point 2 then.
    – luchonacho
    Commented Sep 2, 2016 at 10:53
  • @rene Great! That is exactly what I want! Please provide answer to mark as accepted.
    – luchonacho
    Commented Sep 2, 2016 at 10:59
  • 1
    Meh @luchonacho I think Aziz can add it if they want. If I wanted to write an answer I would have done so.
    – rene
    Commented Sep 2, 2016 at 11:06
  • I just noticed that if you try this and switch to meta, it still links to for example (made-up URL) stackoverflow.com/questions/12345 result with the matching number, not to (made-up URL) meta.stackoverflow.com/questions/12345 . Manually tweaking the URL to point at meta fixes it. A bug perhaps?
    – Lundin
    Commented Nov 10, 2022 at 10:46

You must log in to answer this question.

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