6

I remember reading a very good answer on a site from a particular user who unfortunately has deleted their account and left SE. But of course all the posts are still available as part of the archival trove. I am trying to find a way to search for certain keywords among their answer. I have poked around on this site for an answer but the best I could find is this post.

Make searches for user:xxx work for deleted users as well

The tool offered in the answer seems to allow me to pull up all the posts by a certain deleted user but it seems I can't do searches there. Due to the sheer volume of said user's contributions it's practically impossible for me to go through all their answers to find what I need. So is there a way I can do searches?

1
  • 3
    I sympathise with the problem. There have been 2 or 3 hi-rep users on ELL whose invaluable contributions almost formed the backbone of the site but you wouldn't know it unless you memorised their anonymous user number. You could use Google: type in the key words, the name of the site and, if any, idiosyncratic expressions that were unique to the deleted user, this should help narrow down the results. Maybe in the query you could sort the answers in order of upvotes, and/or if they were accepted. I admit full ignorance whenever queries and code are used. Commented Nov 13, 2023 at 9:15

1 Answer 1

5

There's no easy way to do this. The hard way to do this is to know enough SQL to construct a query, like below, and run it in SEDE:

select 
   id as [Post Link]
  ,body
  ,owneruserid
  ,ownerdisplayname
from posts 
where ownerdisplayname = 'user131971'
and (lower(body) like '%excellent%' or lower(body) like '%null%')

Run it here!

You can see the ownerdisplayname on any post from that deleted user. In the parentheses on the last line, I wrote some logic to find all the answers that have at least one (that's the significance of or) of the two example keywords (excellent and null) — make sure they're written in lowercase and in the same form they appear in the answer! (That is, there is no stemming here, so you'd have to search '%involv%' if you wished to find answers with any of involved, involving, someprefixinvolvesuffix, etc.) If you wanted to find everything with both keywords, change or to and.

You have all the power here (since this is more powerful than site search in almost every way), but you have to know how to write SQL to really take advantage of it. See for example I made a second version which does some of what Mari-Lou A wants: showing the highest scored answers first (note that this deleted user doesn't have any answers).


Note: If the answer was at a negative score when the user was deleted, it would have been deleted along with that user and only a moderator is likely to be able to help you find it. Make sure you upvote posts that deserve it!

You must log in to answer this question.

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