Using ts_weight to impact search relevancy in Knowledge

servicenowkevin
ServiceNow Employee
ServiceNow Employee

Did you know that you can impact search relevancy by field weight in Knowledge? The Controlling Match Relevance by Field section of our documentation takes you through the basics of configuring your search relevancy at the field level. If you're interested in understanding search relevancy from an overall perspective, see Document Scoring.

The default field weighting is:

  • kb_knowledge.number = 50
  • kb_knowledge.short_description = 10
  • kb_knowledge.meta = 10
  • Every other field has a weight of 1 per occurrence and weighting increases exponentially for sequence matches.

At ServiceNow, we're using a weighting of:

  • kb_knowledge.number = 50
  • kb_knowledge.short_description = 15
  • kb_knowledge.meta = 10
  • Every other field has a weight of 1 per occurrence and weighting increases exponentially for sequence matches.

The difference for us is in the short description weighting (short description = article title). We find our result set improves with a greater focus on the short description. With strong titling standards, our titles are written to contain a quick overview of the issue, which should match the users search frequently.

We have been considering using a new field to allow certain articles to always appear at the top as "best bet" or "top suggestion" articles. For example, if a customer is searching on something related to LDAP issues, we may want this LDAP troubleshooting article to appear at the top of each result set because it provides the most comprehensive LDAP troubleshooting information in the knowledge base. To allow for this, we've considered using a custom SuperMeta field and providing a significant weight to that field. That would ensure that select content always appears at the top of results. We've played around with this in our personal test environments and it seems to work, but we haven't taken the idea any further. If we implemented this, we'd have to be very selective about what terms to use and how often the field would be used. If you were to over use that kind of feature, you'd ruin the overall search experience.

Have you changed the weighting for fields in Knowledge? What's working for you?

Let me know if you have search weight questions and I'll try to help you out.

27 REPLIES 27

joell1
Kilo Explorer

As others have mentioned, we'd like to figure out how to place some articles closer to the top of results.   We're also trying to figure out why some articles make it to the top of search results.   We have reviewed the Document scoring - ServiceNow Wiki.


But, we'd like to know if it's possible to actually see the score of the articles after a search.


This is maybe a topic I should blog about again as there are some changes in Fuji with regard to stacking articles at the top of search results.



Pre-Fuji, what you're looking for doesn't exist, unless you stuff the meta field, like we do.



In Fuji, there's an option to set certain articles to appear at the top of results when certain words or phrases are searched.



I'm not sure about actually seeing a document score. Britt Champeau may know more about that.


Hi Joel Lee,



You can add the relevance score to the search results by modifying your Knowledge properties.   Navigate to Knowledge> Properties and ensure the following property is set to true: "Show relevancy in knowledge search results" / "glide.knowman.search.show_relevancy."



Let me know if you have any more questions!


Britt


Hello Britt,



I cannot see the property that you mentioned in Calgary. It is configured in the new instances of SNOW?



Navigate to Knowledge> Properties and ensure the following property is set to true: "Show relevancy in knowledge search results" / "glide.knowman.search.show_relevancy."



Thanks,


Shalini


Hi Shalini Kapoor,



This property is not available in Calgary, but you may be able to find the information you need here:



Legacy: Relevancy Scores for Queries - ServiceNow Wiki



Thanks!


Britt