---
sourceDocument: Xanadu ServiceNow AI Platform Administration
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/platform-administration

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu ServiceNow AI Platform Administration

ft:clusterId :

    - platadm

bundleId :

    - platadm

workflow :

    - Platform


---

# Set the relative weight of a field

# Set the relative weight of a field {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

To improve search results, the Zing search engine assigns to each potential match a numeric score that represents its relevancy to the query.

## Before you begin

Text indexing must be enabled for the table containing the fields you want to modify the relative weight for. To learn about enabling text indexing for a table, see [Configure a table for indexing and searching](https://servicenow-prod.fluidtopics.net/ikx52T2SvdSyrAWcJbB0lA#configure-single-table-for-indexing "Enable Zing text indexing for a table to allow users to search its records for string values. Configure the table's text indexing attributes, stop words, and synonym dictionaries to control search behavior.").

Role required: admin

## About this task

Administrators can control the relative importance of a match for each field in a table with the ts_weight attribute. The majority of fiends have no ts_weight attribute. Zing treats these fields as having weight 1 when scoring
search matches.  
The following fields have ts_weight attribute values by default:

* kb_knowledge.number = 50
* kb_knowledge.short_description = 10
* kb_knowledge.meta = 10
* task.number = 50
* task.short_description = 10
{#t_ControlMatchRelevanceByField__ul_bvw_g1j_54}  
When scoring records, Zing compares the relative weights of fields that produced search term matches. For example, if the Title field has <kbd class="ph userinput">ts_weight=50</kbd> and the Description field has <kbd class="ph userinput">ts_weight=10</kbd>, then a match in Title is 5 times as relevant as a match in Description and 50 times as relevant as a field without the ts_weight attribute.  
Note:  
To view the complete scoring system, see [Document Scoring](https://servicenow-prod.fluidtopics.net/MDC5irr1oMVYfPi~eobWAQ "The Zing search engine computes document scores based on the frequency, sequence, and weight of search terms in the document.").

## Procedure

1. Navigate to AllSystem DefinitionDictionary.
2. Open the system dictionary record for the field's table and column.  
   For example, to modify the ts_weight for the kb_knowledge.number field, open the dictionary record with Table "kb_knowledge" and Column name "number".
3. In the Dictionary Entry form's Attributes field, perform one of the following steps:
   * If a ts_weight attribute appears in the list of attributes, change its integer value to the relative weight you want to set for the field.
   * If no ts_weight attribute appears in the list, add a new <kbd class="ph userinput">ts_weight=&lt;value&gt;</kbd> comma-separated list entry, where \<value\> is the relative weight you want to set for the field.
   {#t_ControlMatchRelevanceByField__choices_pk2_jfx_fwb}
4. Select Update.
5. Refresh the table's text index:
   1. Open the system dictionary record for the field's table.  
      The table's system dictionary record is the one with the table name as its Table value, an empty Column name field, and "Collection" as its Type value.
   2. On the Dictionary Entry form, select the Generate Text Index link in the Related Links section.
   {#t_ControlMatchRelevanceByField__substeps_dvh_fgx_fwb}

## Result

Once Zing finishes regenerating the text index for the table, search result scoring uses your new relative weights for fields.
**Related tasks**   

* [Score search terms by inverse document frequency (IDF)](https://servicenow-prod.fluidtopics.net/J~E3PaAA0q9kPG12u1ueiw "Enable term frequency–inverse document frequency (TF-IDF) to increase the search result scores of search terms that appear more frequently in a document, but less frequently in the whole collection of searchable documents.")

*[\>]: and then


