How do I highlight keywords in Knowledge search results

Lisa LeMaster
Mega Expert

How can I get keywords used in a knowledge search to be highlighted in the search results.  I found information when I googled it that only said this would be in the search source code for knowledge.  Service Portal>Search Sources>Knowledge.  In Rome I don't have that path.  I have Service Portal>Search Sources>Knowledge Base.  I'm just not sure what I'm looking for and what the coding should be if I do find it.   

Here was the not so helpful article: https://community.servicenow.com/community?id=community_question&sys_id=473b6bfbdb132b40fb115583ca9619be

But what the person wrote is exactly what I'm wanting.  I want the keywords I used to be either bold or highlighted, something that would make the user understand why that document come back in the search results.

Thank you in advance for any help!

 

 

1 ACCEPTED SOLUTION

Shane41
ServiceNow Employee
ServiceNow Employee

Hi Lisa,

In my Rome Developer instance, the knowledge base source is available

The highlighting is set in the 'Search page template' field

find_real_file.png

The highlight function is used to highlight the fields, see lines below

find_real_file.png

If you can modify your current knowledge search source to include this it should fix the issue

You can find out the name of the search source by looking at the search results page on your portal

find_real_file.png

If you are still having issues please provide the search page template code from your search source

Hope this helps,

Shane

 

View solution in original post

2 REPLIES 2

Shane41
ServiceNow Employee
ServiceNow Employee

Hi Lisa,

In my Rome Developer instance, the knowledge base source is available

The highlighting is set in the 'Search page template' field

find_real_file.png

The highlight function is used to highlight the fields, see lines below

find_real_file.png

If you can modify your current knowledge search source to include this it should fix the issue

You can find out the name of the search source by looking at the search results page on your portal

find_real_file.png

If you are still having issues please provide the search page template code from your search source

Hope this helps,

Shane

 

Lisa LeMaster
Mega Expert

I discovered this was already set this way when you are searching through the Service Portal.  What my person is asking for is a little different.  They want those same words to be highlighted when they open the document like it was in our previous application we used for Knowledge. I'm not sure that we will pursue that as this should work for what she needs.  Thanks!