45

Please add a search operator that selects for (or against) the protected status flag.

  • Yep, gotta have it. – Lance Roberts Jun 7 '10 at 15:25
  • 2
    Can you provide a use case? I can only think of why a spammer would want to search on that criteria, so my mind must not be right. – Bill the Lizard Jun 7 '10 at 15:40
  • I tried it because I wanted to see what was ending up that way---I guess the data dump would do for that eventually. The only other legitimate use case I can think of is a user under the threshold search for questions to answer; but with the threshold lower than for voting (!) perhaps we can neglect that one. – dmckee Jun 7 '10 at 15:45
  • I don't think very many questions will end up protected (at least the way it's structured now). New users looking for questions to answer are more likely to read recent/new questions than use advanced search features. But I can maybe see it would be useful for the community (i.e. higher-rep or mods) to filter out protected questions. – Gnome Jun 7 '10 at 15:54
19

I agree that there should be a way to search for these, especially as an absent-minded moderator.

One can search for Locked questions with locked:1, perhaps added since Gnome's comment in 2010. One can also search for closed questions with closed:1, deleted posts with deleted:1 (moderators only at this time), and as noted by Shadow Wizard hasnotice:1 to find questions with active bounties, or locked for historical value.

It seems like an oversight that protected:1 does not work the same way.

  • Are you sure deleted:1 works? I don't think so. – hims056 Sep 2 '13 at 7:52
  • 1
    @hims056 most likely only for mods. – Shadow Wizard Sep 2 '13 at 7:55
  • @hims056 perhaps it is a moderator-only field; it definately works on Mathematica where I am one. – Mr.Wizard Sep 2 '13 at 7:56
  • 2
    Don't forget the "hasnotice:1" operator, used to find questions with active bounties, or locked for historical value. :) – Shadow Wizard Sep 2 '13 at 7:59
  • @ShaWizDowArd I was not aware of that one. Thanks for the reminder. – Mr.Wizard Sep 2 '13 at 8:00
5

Since users can protect questions once they have enough rep for the privilege, this is doubly important for moderators and users to be able to search for.

I'm currently trying to investigate a potential misuse of protection privileges and being able to search with protected:true would be very useful. I suspect I would have to resort to the Data Explorer, though it's overkill for this case and that higher barrier (compared to search) may mean I won't find the time for it. A search token for it would be very useful.

4

I'm not sure that it existed when this question was asked, but the 10K moderation tools page includes a link to a list of all protected questions. The one for Meta Stack Exchange is here, the link extension being tools/protected-questions.

This is available to all moderators on their sites and to any users who have access to those tools (10k on sites the higher reputation levels and 4k on sites with lower ones).

While this page is quite useful, it's not searchable, only sortable(-ish). There's no way to restrict which questions show up there other than by date so, as in SevenSidedDie's example, you would have to sort by user and then find their name in the alphabetical list. If this search function were added, a specific user could be included in the search to find all posts protected by that user - or by Community. To make things worse, the sorting only affects the content of the current page, not the entire list, making it nearly useless.

Here on MSE, there are only 137 of them, which isn't bad with 50 results per page, but on sites that use this feature regularly, there are lots (e.g. 727 on M&TV, 659 on The Workplace).

  • Excellent suggestion, although this would only be useful for 10k+ users (but again, probably only those users will be interested in protected questions). – DarkCygnus May 4 '18 at 23:38
1

You can use the following SEDE Query to produce a list of question that are currently protected:

select p.id as [Post Link]
     , p.creationdate [created on]
     , case when ph.userid is null then
         ph.userdisplayname
       else
        concat('site://q/',ph.userid,'|', u.displayname)
       end as [protected by]
     , ph.creationdate [protected on]
from posts p
inner join posthistory ph on ph.postid = p.id
left outer join users u on u.id = ph.userid
where ph.posthistorytypeid = 19  -- protected
-- make sure no unprotect took place later
and not exists (select * 
                from posthistory 
                where posthistorytypeid = 20 -- unprotect
                and postid = p.id
                and id > ph.id)

When run today this will what your result might look like for Stack Overflow:

list of protected questions

Keep in mind SEDE is only updated once a week, on Sunday. If you're new to SEDE give the tutorial a try or join chat

  • Can I search by keyword for protected questions? – Sonic the Inclusive Hedgehog Feb 12 at 17:52
  • @SonictheIntrovertedHedgehog not in this version but the posts table is linked so you add a and p.body like '%keyword%' at the end to achieve that. Use and p.body like '%##keyword##%' for awesomeness ... – rene Feb 12 at 17:56

You must log in to answer this question.

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