- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I have a requirement to exclude all Knowledge in a particular Knowledge Base from the Global Search.
Users still need access to the articles in that KB - they just don't want them to show up in the Global Search.
I have added the condition (Knowledge Base != [the knowledge base]) to both of the active Search Sources (sys_search_source) for Knowledge.
However, when I add a new article in the knowledge base, it still immediately shows up in the global search. In fact, even if I disable the Search Sources for Knowledge, new and existing articles continue to show up in global search.
How can this be achieved? Is there somewhere else I need to add the condition?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Justin Lee2
Apply this KB steps once for Knowledgebase and check
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
FYI - I also added the condition to the "Text Search Table" record for Knowledge. Still has no effect.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Justin Lee2
Apply this KB steps once for Knowledgebase and check
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Thanks Tanushree! Those links got me in the right direction.
For anyone with similar requirements, instead of adding to the existing business rule, I had to create a new query business rule, and call the below function in the "Conditions" field. If you do the check in the actual script, it will work, but it will show an error message whenever you retrieve an article in script. This is because gs.action.getGlideURI() throws a java error in that scenario, and try/catch does not avoid it. However, in the conditions filed of the business rule, it does not show the error.
Additionally, there are a few URLs that may be called by global search. I'd also point out that this is probably a fragile solution, as ServiceNow may change the url called by global search at any time, and this would break. Additionally, there may be places other than global search that use these URLs to retrieve knowledge. So if anyone uses this solution, you may want to regression test with each SN release.