The user:id option restricts search to questions by user id (e.g. "me"), but here's my situation:

I asked a question and remember one answer to it contained a specific keyword, but I don't remember which question it was. How can I search all answers to all my questions for a specific keyword? As an example, how to find this unix.SE comment searching for "process substitution" - or, while we're at it, for ">("?


I just figured this out. Mighty proud of myself, too. :o)

Go to the Stack Exchange Data Explorer and paste this in:

Select Top 30 
From Posts P1
Left Join Posts P2
On P1.ID = P2.ParentID
Left Join Comments 
On Comments.PostID = P1.ID 
Where P1.OwnerUserID = 'Your User ID' 
AND P2.Body like '%Your Search Phrase%'

I'm sure someone better with the Data Explorer can whip up something better, but I was able to use this to find an answer that contained a particular phrase in it, which someone gave to one of my own questions.

I think you were asking about a Unix site so the link might be different, and the available fields might be different too, but the above works fine on SE.

| improve this answer | |
  • Very neat! It doesn't search through comments, but at least for answers to one's own questions this seems to work just fine :) Though one may have to increase the 30 if one posted many questions. And I guess with some minor modifications this would even search through answers to questions oneself has answered instead of asked. By the way, you can use the permalink feature to re-use a query later on, and via the 'Switch sites' button below 'Run Query' you can change the site that is queried – Tobias Kienzler Nov 13 '13 at 7:11
  • @TobiasKienzler - If you want to search comments too, then I think you can add an OR operator to that last line that will search for the same string in Comments.Text. Something like: AND (P2.Body like '%Your Search Phrase%' OR Comments.Text like '%Your Search Phrase%') Or you may need to left join table Comments to P2 in order to do that, I'm not sure. – Johnny Bones Nov 13 '13 at 10:35

On your user page, there is an 'Activity' tab, which shows all of your recent history. While it may not be easily searchable, it is browseable, and may give you what you need.

To get there, select your user page, then click on 'Activity.'

enter image description here

You will note, for example, that posts you "revised" will appear in the list.

| improve this answer | |
  • Sure, but that's not searchable, and I'm looking for a comment/answer someone else posted – Tobias Kienzler Nov 12 '13 at 18:26
  • Um, I said "It isn't searchable, only browseable." Sorry - I don't have access to add features, only give you what may get you closer. I agree with you, this would be nice, but it doesn't exist – Affable Geek Nov 12 '13 at 18:31
  • Sorry for the confusion - the relevant part is that this allows looking through one's own activities, but what I search is someone else's activity on one of my own posts – Tobias Kienzler Nov 13 '13 at 7:02

For the question posed, try this:

"process substitution" is:answer

Unfortunately, without writing your own SE query (which CAN be done) there's no way to filter based on questions you're associated with in this context. This will at least narrow it down a bit, depending on how unique the keyword is.

| improve this answer | |

You must log in to answer this question.

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