SharePoint Online Library Search Box Items different than results

Sean Kuchle 41 Reputation points
2022-06-24T16:30:38.887+00:00

I have an issue where when a user is in a modern document library and types a search below it shows 4 documents, but when the user hits enter to see the results there are 0 results. I think the issue is that the library is over 5K documents and I have to scope the view to today minus 300 days. The documents that show below when searching are past the 300 days and don't show because I think the results page is scoped to the view. This creates a poor user experience, and I would wish to show all results on the results page not just those scoped to the view.

I've tried turning on "Index Non-Default Views" in the library's settings, no help.

To go with the above I also tried to create a view with the older docs basically flipping the 300-day scope. I can now search this view and get the results, but it didn't help when searching the default view.

Is there any other way to make the search a better experience and show everything in the library vs just what the view is scoped for?

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,236 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,737 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Xuyan Ding - MSFT 7,561 Reputation points
    2022-06-27T08:30:18.483+00:00

    Hi @Sean Kuchle ,

    I want to check with you that your default view contains all the documents in the entire library? Check that the default view may have been modified. As for what you mentioned, 4 documents are displayed without pressing enter, because the given suggestion document is searched from the full library, no matter which view, the search box is displayed under the same. If the desired result appears after enter, there is a high probability that there are no files in the default view that contain the search.
    According to your description, your need is to search for the required files throughout the library, and the SP's search is for the current view, so make sure the default view for the search is complete.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Sean Kuchle 41 Reputation points
    2022-06-27T13:18:49.763+00:00

    Thank you for the response but as my library is over the 5K limit imposed on views I am not able to put all the files in the default view thus the issue.
    Is there any way to change the search result page to display all the files instead of the view scope?


  3. Sean Kuchle 41 Reputation points
    2022-06-28T14:57:23.46+00:00

    Thank you for your help, I changed the view to display all, and it worked, and the search worked.
    Just curious can you provide any documentation on this new functionality; I know in classic there was a 5K limit in views but that does not seem to be the case in Modern. Is there a limit in Modern?