Forum Discussion
SharePoint Online Library Search Box Items different than results
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?
2 Replies
Hello Sean Kuchle
you can create a custom search result page. With this search page you can build a search center for your big library and you can configure results and filters how you like:
https://docs.microsoft.com/en-us/microsoftsearch/create-search-results-pages
Here are the PnP Modern Search WebParts you can use build that:
https://microsoft-search.github.io/pnp-modern-search/
Regards, Dave
- Sean KuchleBrass ContributorThank you for your help, I also asked on Microsoft Q&A and he pointed me to the fact the 5K limit does not apply to modern views and sure enough when I displayed all it worked.
I'm hoping they can provide some documentation as to this new functionality as I wasn't aware of the change
https://docs.microsoft.com/en-us/answers/questions/902776/sharepoint-online-library-search-box-items-differe.html
Thank you again for your help!