none
Limiting search to selected category RRS feed

  • Question

  • Hi Team,

    I would like choose a value from a dropdown, so that the search can be limited to the selected area of the dropdown.

    For example if I type a word in search box and select the area in dropdown like library, the word should be searched only in libraries. Please advice me how to achieve this.

    Regards,

    Chaitanya. 

    Thursday, August 1, 2019 10:38 PM

All replies

  • Hi Chaitu,

    Go to Central Admin - General Application Settings - Search.
    Under “Queries and Results” Select - Result Source
    The "Manage Result Source" page will get open. Now, click on the "New Result source” button.
    Name your result source. Leave the "Protocol" radio button set to “Local SharePoint” as we’re searching local content.
    Set the "Type" radio button to “SharePoint Search Results”.
    Next step is to create a search term. Click on the "Launch Query Builder" button to configure the query.
    In a Query text, add the path with {SearchTerms} and full path of the specific document library.
    Example

    {{searchTerms} Path:”https://siteUrl/SearchDocumentsLibrary/” }

    Click Ok for Query Builder
    Click save Button.

    Below articles for your reference:

    https://www.c-sharpcorner.com/article/limiting-search-for-a-specific-library-in-sharepoint-2013/

    http://www.bentedder.com/create-a-search-scope-for-a-sharepoint-2010-list-or-library/

    https://blog.mydock365.com/how-to-limit-search-results-to-a-desired-content-source-for-microsoft-sharepoint-2016

    Thanks & Regards,



    sharath aluri

    Thursday, August 1, 2019 11:58 PM
  • Hi Chaitanya,

    To achieve your requirement, I suggest you could set search settings in the site settings.

    Follow the steps below:

    1. Create two pages named “page1” and “page2”.

    2. Add search box web part and search result web part in the pages.

    3. Edit the search box web part-> select “Turn on the drop-down Search Navigation menu inside the search box, and use the first navigation node as the destination results page.”

    4. Edit the search result web part->Add the URLs of the libraries which you want to search in the query text.

    5.  Go to the site settings-> Search-> Search Settings->Configure Search Navigation->Add the different pages for different search navigation.

    The result as below:


    Best regards,

    Sara Fan


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

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Friday, August 2, 2019 7:35 AM
    Moderator
  • Hi Chaitanya,

    If the reply is helpful to you, you could mark the reply as answer. Thanks for your understanding.

    Best regards,

    Sara Fan

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

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Monday, August 5, 2019 3:24 AM
    Moderator
  • Hi Chaitanya,

    I am checking to see how things are going there on this issue. Please let us know if you would like further assistance.

    If the issue was resolved, you can mark the helpful post as answer to help other community members find the helpful information quickly. 

    Best regards,

    Sara Fan

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

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Wednesday, August 7, 2019 6:47 AM
    Moderator