Forum Discussion
Modern Page Search Results
We are trying to build out a KB using the new Communication Site templates in SharePoint Online. What we are running into is that the search is returning pages, files, folders, etc. We only want to return the pages that we have built as part of our KB. Is there a way to restrict or filter down those results to just be pages? I have built a Basic Search Center as a sub-site to our KB site but even that site is not allowing me to edit the search results pages, which is really frustrating as I have not run into these problems before. I am a Global and SharePoint admin in our tenant and a site owner, so permissions shouldn't be a problem.
7 Replies
- Luke HoffmanIron Contributor
Hey Joe - How about just using the library settings and setting all the libraries you don't want to show to not be included in the search index. I'm doing this in one of our modern sites now and it's only returning pages when I search on that particular site.
- Deleted
Are you trying to edit _layouts/OSSSearchResults.aspx page? You will not be able to edit this page. You need to build the search center subsite. Follow this article replace the default search results page and you should be able to edit.
https://kalmstrom.com/Tips/SharePoint-Online-Course/SharePoint-Search-Center.htm
- Joe VolkBrass Contributor
No, I am trying to edit a page in a Search sub-site: /sites/ITKB/search/results.aspx?k=password.
I would also like to be able to make changes to this page: /sites/ITKB/_layouts/15/search.aspx/siteall?q=password. That is a nice search experience in the modern look and feel, but the limitations on it are bad. No way to adjust the scope or filter out just pages, etc.
Any suggestions?
- Alan MarshallIron ContributorIn the SharePoint PnP framework web parts, their is a modern search result web part that includes refiners, I think you can also define a query to narrow down results. This may give you what you need and you could customise it if you have a developer.
- Yes, you can absolutely do what you need...for instance, by adding a Content Type filter in the search results webpart. What's very strange is that you cannot edit the search results page in your search subsite...are you sure you are trying to edit the right search results page?