Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Weighting when searching for knowledge articles

Rocco K_hling
Tera Contributor

How is the weighting of the fields within an article and the search location weighted when searching for knowledge articles in ServiceNow?

1 REPLY 1

vaishali231
Kilo Sage

Hey @Rocco K_hling 

In ServiceNow Knowledge Search, the weighting of fields and search location is handled by the underlying search engine (Zing or AI Search), and there is no single UI screen showing all weights together. Instead, it is controlled through field configuration and search context.

 

1. Field Weighting (Zing – Classic Search)

In Zing, field relevance is controlled using the ts_weight attribute on dictionary entries of the kb_knowledge table.

Where to check / configure:

  • Navigate to: System Definition → Dictionary
  • Filter by table: kb_knowledge
  • Open fields like:
    • short_description
    • text
    • meta
    • number

In each field, check the Attributes field.

Example:

ts_weight=10

vaishali231_0-1777463778430.pngvaishali231_1-1777463804673.png

 

How it works:

  • Higher ts_weight = higher influence on ranking
  • If not defined → default weight = 1
  • Scoring is roughly:
    relevance ∝ term frequency × ts_weight

Typical behavior:

  • short_description → high weight
  • meta/keywords → medium
  • text (body) → low
  • number → very high for exact matches

 

Important:

After updating weights:

  • Go to System Definition → Text Indexes
  • Click Regenerate Index

Otherwise, changes will not take effect.

 

2. Field Weighting (AI Search)

If you are using ServiceNow AI Search, ts_weight is not used.

Where to configure:

  • AI Search → Search Sources
  • Open your Knowledge source

What to check:

  • Field Mapping:
  • short_description → title (highest weight)
  • text → content (medium weight)
  • Indexed fields configuration

Key point:

Weighting is controlled indirectly via field roles, not numeric values.

 

3. Search Location / Context Weighting

Search results are also influenced by where the search is performed.

Controlled via:

  • Search Source / Profile
  • Knowledge Base
  • User role / permissions
  • Language / region

Where to check:

  • AI Search → Search Sources
  • Filters and conditions defined there

Impact:

  • Determines which articles are included
  • Applies context-based boosting

 

4. How to identify which search engine you are using

Check system property:

  • glide.knowman.search.use_ai_search
  • true → AI Search
  • false → Zing

 

5. Summary

  • Zing: Field weighting is controlled via ts_weight in Dictionary
  • AI Search: Weighting is controlled via field mapping and boosting
  • Search location: Controlled via search sources, filters, and user context

6. Practical recommendation

  • Ensure important keywords are in Short Description and Keywords fields
  • Use AI Search for better tuning and ML-based relevance
  • Use Result Improvement Rules (AI Search) for additional boosting if needed

*************************************************************************************************************************************

If this response helps, please mark it as Accept as Solution and Helpful.

Doing so helps others in the community and encourages me to keep contributing.

Regards

Vaishali Singh

Servicenow Developer
Linkedin - https://www.linkedin.com/in/vaishali-singh-2273361bb