locked
Result Source does not return results when using search box webpart RRS feed

  • Question

  • I'm having problems when using a new Result Source that does not return any items. I'm using SharePoint 2016

    1. Created a new Result Source that is limited to a document library
    2. Created a new page and added a searchbox webpart and a search results webpart
    3. Edited the Search Results webpart and selected Change Query
    4. In the Build Your Query window from the Select a query dropdown I select my new result source
    5. I click Test Query and in the results window only items from the document library are displayed
    6. I click Apply on the webpart and save the page
    7. The page displays every document in the library. Looks great so far.
    8. When I type an item I want to search for in the search box and press enter nothing is returned. Even though the item I am searching for is in the list.

    I'm not sure what I am missing. When starting a search all documents are displayed. When when i type in my search criteria and hit enter nothing is returned. 

    Thursday, April 2, 2020 6:48 PM

Answers

  • I figured it out. I created the result source at the site and site collection level. There is a third place you can create a result source, in Central Admin. When I created the result source in CA the page started working properly. Why are there three places to create a result source and only one of them (CA) works?
    • Marked as answer by cjlangham Thursday, April 2, 2020 9:58 PM
    Thursday, April 2, 2020 9:57 PM

All replies

  • Open the SharePoint 2016 list and then go to the List settings page. And then click on Advanced Settings. In the Advanced Settings page, Go to the Search section and then select “Yes” in the Allow items from this list to appear in search results?

    Then Reindex the List and wait for day and then give it a try.

    Below article for more troubleshooting steps:

    https://www.enjoysharepoint.com/sharepoint-2013-find-an-item-search-box-does-not-return-results/

    Thanks & Regards,


    sharath aluri

    Thursday, April 2, 2020 8:24 PM
  • The setting "Allow items from this list to appear in search results" Yes is already checked. The url you referenced has nothing to do with what I'm trying to accomplish. I've created a new search page with a new result source that searches the document library. When i save the new search page all the documents from the document library are displayed in the search results webpart. But when I type my criteria in the search box and press enter no results are returned. Thanks for trying.
    Thursday, April 2, 2020 8:38 PM
  • I figured it out. I created the result source at the site and site collection level. There is a third place you can create a result source, in Central Admin. When I created the result source in CA the page started working properly. Why are there three places to create a result source and only one of them (CA) works?
    • Marked as answer by cjlangham Thursday, April 2, 2020 9:58 PM
    Thursday, April 2, 2020 9:57 PM
  • I am not sure why it didn't worked for you but basically Result sources can be created at the Search service application level, site collection level, or site level. This enables Search service application administrators, site collection administrators, and site owners to create and use result sources to meet their specific requirements for providing search results to users. When you create a result source at the Search service application level, for example, the result source is available to any query rule that is created at the same level, and also to any query rule that is created for a site collection or site that is in a web application that consumes that Search service application.

    Below article for your reference:

    https://docs.microsoft.com/en-us/sharepoint/search/configure-result-sources-for-search

    Thanks & Regards,


    sharath aluri

    Thursday, April 2, 2020 10:17 PM
  • Hi cjlangham, 

    I am glad to hear the issue is solved, thanks for your Sharing. 

    For your issue, make sure there is a space between the {searchTerms} and path: when you create a result source:

    {searchTerms} path:http://yoursites/yourlibrary

    Best Regards,

    Lisa Chen


    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, April 3, 2020 2:32 AM