SharePoint: How to search a Wiki

When displaying most SharePoint list and library pages the Search scope dropdown at the top of the page includes a "This List" entry. This is missing for Wiki pages. There are three ways to search just the wiki and not the entire site. The first two are standard SharePoint, but a bit hidden for wiki's...
  1. First display the Wiki as a list:
    1. Click View All Site Content and then click the wiki or
    2. Scroll to the bottom of the Quick Launch area (below the Recycle Bin link) and click "View All Pages" or
    3. Display the wiki as usual and then click the wiki's name in the "crumb trail"
  2. Select "This List: wiki name" from the search scope dropdown
The following is a bit more formal and does not require the user to navigate to the wiki first...
You can setup search to point to any URL, inside or outside of SharePoint. Here's how I setup one for a Wiki:
(Search scopes can be setup from both Central Admin and your top level site - this example is from a site)
  1. Go to your wiki page and copy the URL, up to but not including "home.aspx" (http://maxsp2007/training/MyWiki)
  2. Go to Site Actions, Site Settings
  3. In the Site Collection Admin column click Search scopes
  4. Click New Scope
  5. Type the name or title to display in the search scope dropdown, optionally add a description
  6. Check "Search dropdown" and click OK.
  7. In the line for the new scope click Add Rules
  8. Click Web Address
  9. Paste your Wiki URL in the Folder box
  10. Click OK
  11. The scope will not be displayed in the search scope dropdown until the next full or incremental search index run.




Chris mauldin said...


I'm probably going to feel like a moron ... but I'm used to it!!

On SharePoint 2013 how do I add a drop down to just search the Wiki Library on a page?

Or perhaps I should state my need
"I would like users to be able to search through the entire WIKI to find something without getting hits from other libraries/lists on the site"

It used to be very easy before 2013.

HELP!!! Using Result Sources seems like a lot of extra work. I have one site collection with 30+ sites each of which has a WIKI (user guide).

Chris Mauldin

Mike Smith said...


2013 did not make it easy to add to the search box drop-downs.

In 2013 you have these options, with the third being the most likely:

1) Create a custom search results page in your Enterprise Search Center and customize the Search Results web part to filter using a path (path:https://yourserver/sites/yoursite/yourWiki).
Or... Do the above but use a Result Source.
Then customize the Settings (gear), Site Settings, Search Settings (for Site), and Search Navigation for each site (see #4 below).

2) Give the user the link to the Wiki page in a library view instead of a page view. Typically add the link to this view to Quick Launch.
- In the Wiki page click the Page ribbon and then View All Pages. Copy that URL and add to with Quick Launch. (The search box at the top of the library will only filter the list, not show highlighted hit results.)

3) Create a custom search page in the current site and link to it from Quick Launch:
- Create a new page in the Site Pages (or Pages) library. Edit the page and add a Search Box and Search Results web part.
- Edit the Search Results web part, click Change Query and modify the query to be something like:
{searchboxquery} path:"https://yourDomain/sites/yourSite/yourWiki"
- Add the URL to this custom page to Quick Launch with a name something like "Site User Guide Search".

4) Do "3", but add the link to the existing search dropdown. You would then need to create a custom set of Search Navigation Settings links to duplicate the four out of the box defaults, then add a link to the new search page.
You would need to do this to each of your 30+ sites, or write some PowerShell to do it.

When I get a little free time I could put together a blog article about one of these. Let me know if one looks like an option for you.


Chris Mauldin said...


Thx for the quick reply. I need to give this a little more thought. Its immediately obvious that there are two driving factors:

1) Ease of use for the users.

Our biggest challenge here is that 95% of the users are expecting either one search box at the top right of a SharePoint page which by default searches the whole site, OR, An additional search box at the top of a list/library that just searches the list. We all know how users tend to simplify life and generalize.

2) Ease of maintenance/implementation of the solution. How much work is it to setup the "new search" from a techy point of view. Ideally the solution is so simple that it could be done by a power user (Non Techy - Site Owner)

Based on the above the optimal solution from a user perspective would be one of the following:

1) BEST: Change the behavior of the TOP RIGHT Search box so there is a drop down ability to restrict the search to the WIKI. This not only helps on WIKI pages but in fact is a great way to search the WIKI without having to first go to the WIKI Home Page.

2) Add a new Quick Link that goes to a Search WIKI page. This solution is not that bad, EXCEPT for when the users are actually on a WIKI Page. In this case its a simply extra step.

3)Add a Search Box onto the WIKI Page (so it looks a bit like the search at the top of list/libraries. [This is technically nasty since it would need to go on every page]. The only way this would work would be to somehow get control of the MASTER PAGE logic for WIKI's since it would need to still be there after a user changes the TEXT layout. NOTE: This solution might also address the bigger issue of headers and footers in WIKI Library pages. Just put the search button on the WIKI "header" along with things like when the page was last modified and by who.

I'm guessing your Option 3 is the easiest/best option at the moment although Option 4 would be interesting if it was not a nightmare of IT maintenance.


Chris M.

Note to spammers!

Spammers, don't waste your time... all posts are moderated. If your comment includes unrelated links, is advertising, or just pure spam, it will never be seen.