top of page
Writer's picturesajan Allan Roy R

Zing search - some basics



Zing Search Engine:


· This is SN’s search engine completely built in-house for SN.


Search result mechanism:

  • Zing search primarily relies on the following key elements to give search results:

o Frequency – how frequently the search term is present

o Sequence – how much of the search term is completely present as a sequence

o Weight – How much weight has been allotted to the field that is matched with the search term

  • In addition to the above, ‘meta’ tags added to kb or cat items also improve the relevancy of the search result

  • Meta field, in itself, have a weight of 10, in the case of kb (so meta field basically adds weight for search results)

  • Text search weightage can be added at field level by using the below method:

o Go to the dictionary

o Open attributes and add Text search weight (or ts_weight)

o Give it a value (ranges from 0 to 255)

o More the weightage, more are the chances of appearing on search results


Junk Filter:

  • Two-digit numbers and single characters usually do not give search results since Zing does not index for them (unless Chinese or similar)

  • This is because these phrases are considered Junk phrases.


Configuring the Junk Filter:

  • This can however be overridden by overriding the junk filter – by adding the dictionary attribute ‘Text index filter junk’ and setting the value to false (text_index_filter_junk=false on sys_dictionary attribute, or on the collection record of the table, say task)

  • Note that when changes like these are made, the ‘Generate Text Index’ related link is to be triggered, for the changes to be relevant.

  • Also in case, the junk filter is marked false, the stop words need to be re-visited.


Stop words:

  • Stop words are search terms that are not considered for providing search results – like: is, was, a, the, etc.

  • This is basically to allow users to search for whole sentences rather than focusing on picking the correct search phrase to use.

  • This config is present on table ts_stop, under System Definition > Text Index Stop Words


Text search log and suggestions:

  • Every text search that is done by the user is stored in the table: text_search.

  • This table will show the exact search phrase used and the results yielded from each table that is configured for that user to search on.

  • Search suggestions are shown based on the table ts_search_stats.

  • This table is populated through the job ‘TS Search Stats

  • If no search suggestions are available for a user, the ACL that controls access to the ts_search_stats table needs to be modified to provide read access.


Search results visibility:

  • The list of user roles that can access the global search is defined in the system property: glide.ui.can_search.

  • The list of tables that should be excluded from the global search is configured in the system property: glide.ui.no_text_search.

  • The ‘Search Groups’ configuration also decides what users can search which tables. This is created similar to user criteria for users to match, in order for them to see search results from that table.

  • The user should have read ACLs written on the expected search table.


Configuring the Search results UI:

  • The property ‘glide.ui.text_search.match_view’ controls the view to be used when a matching record is displayed and opened from the search result. By default, the value is empty implying that the default view is to be used. This can be replaced with a view name, say ess. If the mentioned view is not present for a record, the default view will be picked.

  • The property ‘glide.ui.text_search.view’ controls the view to be used on both list and form when search results are provided. By default, the value ‘text_search’ is populated.

  • Search results are honored by ACLs. Users only with the read roles to the table records can access search results.


Attachment indexing:

  • By default, only knowledge base records allow searching through attachments and their contents.

  • To enable attachment searching available for a table, go to sys_dictionary and add the attribute ‘attachment_index=true’ to the collection record.

  • Attachment indexing done for the parent table does not apply to the inherited tables.

  • Similar to other indexing, the attachment index will regenerate the index (Re-indexing) for the table. Suggested to do off-business hours.


Few points to consider while using the Global search:

  • Search phrases with ‘null’ in them, prevailed or followed by a space will not yield results, since it is considered as an actual null value. Use the null keyword appropriately.

  • Search phrases with punctuation do not yield appropriate results. Remove or replace them to get expected results.

  • to search for an exact match for a phrase, use the search phrase in quotes – “Search Phrase”.

  • Underscores in meta tags are replaced with spaces by the zing engine.

  • Search words with numeric digits(0-9), periods(.), hyphens(-) and underscore(_) are considered as a single word. Ex: ‘Upgrade_2.0’ is considered as ‘Upgrade_2.0’ and not ‘Upgrade 2.0’.


Helpful links:

3. List of properties related to the global search: https://<instance>.service-now.com/sys_properties_list.do?sysparm_query=descriptionLIKEglobal%20text%20search&sysparm_first_row=1&sysparm_view=&sysparm_choice_query_raw=&sysparm_list_header_search=true

4. Global Text Search: http://sn.sptrac.com/?p=214

29 views0 comments

Recent Posts

See All

Comments


bottom of page