none
Limit search to wiki pages only?

    Question

  • Hi all.

    I've added a "Search->Search Box" web part on my Home page of the wiki. So far so good.

    The problem is that I can't find any way to configure the query of this web part in order to limit the search to the wiki only.

    Is there any way to do this with this web part? If not, how should I go about this?

    Thanks!

    Tuesday, April 4, 2017 8:58 AM

Answers

  • Hi Martin,

    To achieve your requirement, add a search results web part in home page->edit search results web part->Change query->Set the query text like: (contentclass:STS_ListItem) AND contenttype:"Wiki page"

    Best Regards,

    Lisa Chen


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com


    Tuesday, April 11, 2017 10:12 AM
    Moderator
  • Thanks Lisa.

    I needed to tweak it a bit in order to send the query to a new results page, and limit the search to the current site (as we have numerous sites).

    This is the final query text:

    (contentclass:STS_ListItem) AND contenttype:"Wiki page" AND Path:{Site.URL} and {QueryString.k}

    Tuesday, April 18, 2017 8:59 AM

All replies