5

I am looking for a simple solution to search all posts of a Stack Overflow user using their display name and not their numeric ID.

I know that I can search using following command: user:12345 where "12345" is the user's numeric ID.

But I need a simple solution like: user:skywalker, where "skywalker" is the name of the user or their alias.

I have tried searching using an alias, but there are no results.

Is there a solution to this problem?

2018-02-05: modification to first post

In fact, searching in User List is a good solution!

For me, the only missing thing in this search's screen is the fact that the possibility to search using the full username is missing!

To allow that, two changes must be implemented:

  1. Allow users to modify UserFullName visibility. Currently FullName is defined in privacy and is certainly PRIVATE.
  2. Allow search USER process to search user not only on alias but also on PUBLIC FullName.

Another enhancement would then be to add a new search tag to complete "user" tag that would be "username".

Example: username:"Luke Skywalker"

This is only a proposal :-)

6
  • No, you can only use the id of the user. Usernames are not unique on SO so using the alias would cause all kind of problems.
    – rene
    Nov 23, 2017 at 10:36
  • 4
    That doesn't seem to make a lot of sense - the userID is unique to one user; the alias is not. Best you can do is Google skywalker site:stackoverflow.com but that will generate a lot of results depending on how frequent the name is
    – Pekka
    Nov 23, 2017 at 10:36
  • Sorry, but that make sense for me and I don't know that username are not unique because in user's list you always display username and not userid.
    – schlebe
    Nov 23, 2017 at 10:46
  • 2
    What do you need this for? Maybe someone has an idea for a workaround
    – Pekka
    Nov 23, 2017 at 10:50
  • 1
    @schlebe Search for users with the alias Jon Doe, there are thousands.
    – user0042
    Nov 23, 2017 at 10:51
  • 6
    Probably the simplest way that SO supports natively is to type who you're looking for into stackoverflow.com/users and then click through to their profile and go from there... Nov 23, 2017 at 11:26

1 Answer 1

4

You can do so with SEDE, for example with this query.

select p.id as [Post Link]
     , coalesce(u.displayname, p.ownerdisplayname) [user name]
     , u.id as [User Link]
from posts p
left outer join users u on u.id = p.owneruserid
where coalesce(u.displayname, p.ownerdisplayname) 
      like '%##username##%' collate  sql_latin1_general_cp1_ci_ai

This will return all posts from users named skywalker. This can be multiple users as the username is not unique on SE.

Find the schema documentation here and have a look at the awesome tutorial if you want to learn the tricks of the trade yourself.

Keep in mind that SEDE is only updated once a week, on Sunday.

You must log in to answer this question.

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