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.
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
When scoring records, Zing compares the relative weights of fields that produced search term matches. For example, if the
Title field has
ts_weight=50 and the
Description field has
ts_weight=10, 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.
Procedure
-
Navigate to .
-
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".
-
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 ts_weight=<value> comma-separated list entry, where <value> is the relative weight you want to set for the field.
-
Select Update.
-
Refresh the table's text index:
-
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.
-
On the Dictionary Entry form, select the Generate Text Index link in the Related Links section.
Result
Once Zing finishes regenerating the text index for the table, search result scoring uses your new relative weights for fields.