Service Portal home search how to restrict HR based Knowledge base? in used Search source
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2025 01:25 AM
Hi Team,
I try to restrict search for HR based Articles... I have created Search source and added the filter conditions but its not working still its showing search result in Service portal home search any way if i will try to click its showing secure Constance this is fine but i am trying to stop while search itself should not show all article related HR knowledge base
if any open solved this type of issue please do needful to me. for more details please find the screenshot.
Thanks & Regards
PB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2025 01:45 AM
Hi @pavana3 ,
Update the Search Source Filter
1.Go to Search Sources in ServiceNow (you can search for it).
Find the one used for Knowledge Articles (usually named “Knowledge”).
Add a filter that says something like: Knowledge Base is not HR Or: kb != [HR Knowledge Base sys_id]. This will skip HR articles completely.
2. Check if You’re Using a Custom Search Widget
If your portal uses a custom or cloned search widget (like "typeahead"), it may ignore filters.
Open the widget and make sure the script is also excluding HR articles with a line like:
query.addQuery('kb', '!=', 'HR_KB_SYS_ID');
3. Rebuild the Search Index
Sometimes, even after updating filters, old search results still show up.
Go to the Search Source record, click on “Rebuild Index” to refresh it.
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Pavani P
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2025 03:15 AM
This are conditions i used but its not working for main home serviceportal search
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2025 03:15 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2025 04:45 AM
Hi @pavana3 ,
If you have already given Knowledge base is condition you dont have to add any additional conditions.
In the next screenshot, I see you have written Knowledge base doesnt contain, Please select HR knowledge bases.
After updating condition, please rebuild index to refresh it.
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Pavani P