Tuesday, November 11, 2014

Tired of getting AllItems.aspx hits in your results?

If you append -contentclass:STS_List_* to your query template, they will all be excluded. In effect all list landing pages will be removed including:

  • AllItems.aspx
  • AllPages.aspx
  • AllPosts.aspx
  • AllCategories.aspx
  • Calendar.aspx
  • Overview.aspx

If you want to find all types excluded use the SharePoint 2013 Query Tool from Codeplex and issue the following query.

  • Row limit: 100 (or some high number)
  • Query Text: contentclass:STS_List_*
  • Collapse Spec: contentclass

The collapse specification ensures you only get one result per unique value.