5

The user: search operator lets you limit a search to only posts from a specific user, e.g. user:153020 is:a finds all my newest answers on MSE.

Often, particularly during moderation tasks it's handy to be able to find posts from multiple users that are prone to the same problematic behaviour.

For example I currently have a set of bookmarks for a "naughty list" that are worth checking up on occasionally, ordered by newest post but for each user with the same rest of the search I have to do it individually. It's easier to see the bigger picture patterns if these are all in the same list.

Please can the user: operator be expanded to allow limiting a search to posts from multiple users. A possible syntax would be:

user:w,x,y,z

This would also make it possible to write greasemonkey scripts that automatically construct such searches from other pages on the site.

I see the primary utility of this as relating to moderator activities, but certainly not a bad thing to have available more generally.

4

Until this gets implemented, the API method /users/{ids}/posts can be used for the same purpose. My bookmarklet Stalker uses it to show the 20 most recent posts by selected users. For demonstration purposes, the watchlist (first line) is filled with Ids of known troublemakers here on Meta.

The code is at the bottom of this post; it's written in condensed bookmarklet style, but still readable. Some remarks:

  1. The site parameter is taken from the current location; that is, it is assumed you are already on the site of interest. So, the only line that needs to be changed is the first one, the list of Ids.
  2. Full post bodies are fetched and displayed.
  3. The number of posts (pagesize parameter on the second line) is set to 20, but could be as large as 100 (the list would get pretty long, though).

Limitation: you can't get deleted posts through the API, unlike with diamond-only deleted parameter in site search.

w=[98786,811,146126,50049,165581,1438,175506,131713,238110,209637,274323]; 
u='//api.stackexchange.com/2.2/users/'+w.join(';')+'/posts?pagesize=20&order=desc&sort=creation&site='+window.location.hostname+'&filter=!5RBRwRzb5AH6Wj.aupkPpUak)&key=Et85mmN554B9xljOY9htyw((';
h=[];
$.getJSON(u, function(e) {
  p=e.items;
  for (i=0;i<p.length;i++) {
    h.push('<hr><h3><a class="question-hyperlink" href="'+p[i].share_link+'">'+(p[i].post_type=='question'?'Q: ':'A: ')+p[i].title+'</a><h3>');
    d=new Date(p[i].creation_date*1000);
    dm=d.getDate()+' '+['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'][d.getMonth()];
    h.push('<h4>'+p[i].owner.display_name+' on '+dm+'. Score '+p[i].score+'</h4><br>'+p[i].body);
  }
  $('#content').html(h.join(''));
});
| improve this answer | |
  • That's quite neat as a workaround and it suggests that getting it implemented as a fully fledged feature wouldn't be too much work too. – Flexo Jan 11 '15 at 8:41

You must log in to answer this question.

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