Limiting kb-search widget to just a single knowledge base
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2022 02:02 PM
Our team has a portal with multiple knowledge bases. We have cloned the ootb kb-search widget and want to limit the search to just a single knowledge base. Is this possible? We see that ng-click triggers a function called c.keywordChanges and was hoping to add some code to filter the results down to a single knowledge base, but can't seem to find where the code behind that function is. Has anyone done this before? Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2022 07:14 PM
If I understand correctly you are using the search widget in the Service Portal and want anyone doing a search to only get results for one specific knowledge base?
If that is correct then you should not need to change the code in the widget at all, you do it in the particular portal configuration.
In the menu, go to "Service Portal" >> Select "Portals", then select the portal that you are using from the list eg: "Service Portal", then once the config page is loaded scroll to the bottom and you should have 2 tabs there called: "Search Sources" and "Knowledge Base"
You just need to make sure that only the sources and specific knowledge base is listed there, then when someone uses the search widget on the portal, they are the only places results will show from.
Hope this is what you are looking for.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2023 05:46 PM
Do you know how we would limit the portal knowledge bases widget to only show active knowledge bases in the pick list?