I have read the first 10 articles on Google about how to create a custom search in SharePoint 2013, but none of them talk about searching for pages. I don't want to search, everything, people, conversations, or videos. I simply want to

  1. Search for any page within a specific Subsite (i.e. /mysubsite/)
  2. Pdfs within a specific Document Library (/SiteCollectionDocuments/)

Are these 2 scenarios possible in SharePoint 2013, if so how?


Yes. These type of queries are possible.

You can do this by two possible ways

  1. Edit the Search Result WebPart and change the Query Criteria to query particular library
  2. By Creating a Result Source to query particular library

For Creating result source - Check this blog http://social.technet.microsoft.com/wiki/contents/articles/25783.sharepoint-2013-working-with-result-sources-to-limit-search-results.aspx

For searching inside specific site you can use managed property Site.

For file type search, you can use managed property FileType:PDF

  • thank you Amal, what if I wanted to search for FileType:PDF and .DOC, and .Zip, within a specific document library? – klewis Jan 23 '15 at 22:46
  • You can combine this into a single query Path:LibraryPath FileType:PDF FileType:Doc FileType:Zip – Amal Hashim Jan 23 '15 at 22:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.