none
Document Library Search But Not Available in Search Center RRS feed

  • Question

  • I have question about Document Library Search Feature.

    We have need to search file name in document library so we use the search box above document, questions.

    1. When I enable the document library search in document library advance setting, will this also make the document visible when user search in search center?

    2. If the answer is yes for above questions, how can I prevent the document show up in search center, but it is still available for the search above document library?

    Thanks

    Tee

    Sunday, January 26, 2020 6:15 AM

Answers

  • Hi, Tee,

    For the first question, yes. 

    For the second question, as the file is searchable, it will be displayed in search center. This behavior is by-design. Here is a solution using custom result source you can try. It works in my end.

    1. Create a custom result source in CA. Leave everything as default (or the settings you need). Go to the Query Builder. Add the query "-Path:http://your library path/" like the screen below:

    Use the test tab to test with the new query. Make sure it does not return the document you want to hide in search center.

    For more information about building query, please check this:Keyword Query Language (KQL) syntax reference

    2. Go the the search center. Navigate to Site Settings>Result Source, set the newly created result source as the default one. Then you shall not be able to find the documents in the search center. While still users will be able to search for documents in library level.

    Best Regards

    Jerry


    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.

    • Marked as answer by Mr. T1 Monday, January 27, 2020 11:20 PM
    Monday, January 27, 2020 2:25 AM