0

I have a search bar and a search refiner web part. I see that the search refiner includes Result Types like Document, PDF, Excel page, etc. Can I add a custom result type -- call it "Apps" and have it set to an "Application Directory" SharePoint List? So that I can click this refiner and have my search results narrow down to only what's inside that SharePoint List?

1 Answer 1

0

Probably it is easier to create new search results page with search results filtered by Path property (which is path to your sharepoint list).

And then add this page to search navigation. Thus allowing to narrow down search results by clicking Apps "tab" in search navigation (next to default All, People, Videos etc.)

Setup is mostly depends of what edition of SharePoint you have installed (Foundation\Standart\Enterprise) and whether you have separate Search Center site or using built-on search results page. If you're making search request and find yourself on page like /_layouts/../osssearchresults.aspx, then you are using built-in search pages.

If so, it would be better to create new Result Source (Site settings - Result Sources - New result source). Call it Apps, for instance and modify Query transform field to smth like:
{searchTerms} path:https://your-site/lists/app-dir-list* (contentclass:sts_listitem).
Don't forget to validate your query in Query Builder - if any of results are being returned.

Then, navigate to your Pages library and create blank webpart page.
Add search webparts to this page: Search Box, Search Navigation and Search Results.
Then, modify Search Results webpart and choose your newly created Result source Apps in query editor.

Also you should add this page to Search navigation (Site Settings - Search Settings - Configure Search Navigation - Add link).
You should also create "default" results page (using the above method) with all results and default non-changed query and result source, otherwise every search box will use your Apps result page as default.

If you're using separate Search Center site (based on Enterprise Search Center template), then you already have some search results pages.
You should only create new one (as described above) and add it to Search Navigation.

Also, it is not required to create separate Result Source, you can just modify query directly in Search Results webpart settings as needed.

5
  • I should have mentioned this is SharePoint 2013. Can you explain more in depth? I'm following the idea, but not sure how to achieve that. Right now, I have a test page with a search bar, and I want to be taken to another page when I hit Search, where the search results will be located.
    – Daniel
    Commented Apr 4, 2022 at 19:34
  • @DanielPickert, I edited my answer, hope that this mini-guide will provide you some basics to start from.
    – lehuspohus
    Commented Apr 5, 2022 at 0:20
  • thank you good sir
    – Daniel
    Commented Apr 13, 2022 at 13:55
  • instead of (contentclass:sts_listitem), can I drill down to target a certain column within that list item? If I have an application, (contentclass:sts_listitem) will show the correct list item in the search results, but clicking that will take me to the list item itself, not the application URL, which is a column inside that list item I need to target
    – Daniel
    Commented Apr 13, 2022 at 14:28
  • I'm not sure of what are trying to achieve at the end. By modifying query you can only narrow down a search results, i.e. set of items. By clicking it, you will navigate to this item display form, anyway. You can create\modify search display template to customize of how your result will be displayed in search results, for instance, to show "Go to" label containing hyperlink from you specific column. You can get an idea of search customization from this playlist: youtube.com/playlist?list=PL2YXlDtx3kXOE8eb3ZIAo2b3DpcSR01tF
    – lehuspohus
    Commented Apr 16, 2022 at 18:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.