Two-letter words and Zing search

jeffblancato
Tera Contributor

Hi all,

I remember seeing this discussed a while ago on either SN community or in SN's documentation, but for the life of me, I can't find it anywhere.

We have a number of knowledge articles regarding I-9 and W-4 forms, and many end users search for them as "i9" and "w4" - I want to configure Zing to accommodate that behavior.

My first attempt at tackling this was to put those terms in the respective articles' Meta field. However, having done that, searches for "i9" and "w4" don't return any results... I'm pretty sure I remember reading somewhere that, by default, Zing doesn't index any words having fewer than 3 letters.

If that's truly the case, what are my options? Asking end users to instead search for "I-9" and "W-4" isn't feasible.

Thanks!

-Jeff

8 REPLIES 8

shruti_tyagi
ServiceNow Employee
ServiceNow Employee

Try this dictionary attribute: text_index_filter_junk = false



https://docs.servicenow.com/bundle/helsinki-servicenow-platform/page/administer/search-administratio...



Also make sure these word are not marked as stop words, in ts_stop table: Under System Definition --> Text Index Stop Words



Thanks


Shruti


If the reply was informational, please like, mark as helpful or mark as correct!


Thanks, shruti.tyagi. Disabling the Junk Filter across the board isn't desirable -- the ripple effects of that appear to be too far-reaching.



Is there a middle ground -- any solution that provides more granular control over what Zing does with a particular search term?


Hi Jeff,



Junk filter is disabled for kb_knowledge OOB if you have not removed it, its a dictionary attribute and you can turn it on and off per table.


I am guessing these keywords are in knowledge articles:


These words I-9 and W-4 will be stored as 'I' '-' and '9', I is normally a stop word so system will gonna look for for - and 9. But you will not get anything for w4. Your idea to add it in meta field is correct.



You should be able to get results with 'w4' is its added in Meta. I just tested it in my OOB Istanbul instance, added w4 in meta and its searchableScreen Shot 2017-08-28 at 12.05.33 PM.png



Check if you have assigned any ts_weight to meta field in dictionary. OOB for meta field its ts_weight=10. It is a dictionary attribute as well:


Screen Shot 2017-08-28 at 12.07.17 PM.png



Make sure to regenerate text index after you make these changes. System Definition --> Text Indexes Search for kb_knowledge table.Open record and from Related link Regenerate Text Index.


Wait until its finished text index regenerated.



Thanks


Shruti


If the reply was informational, please like, mark as helpful or mark as correct!


Michael QCKM
Tera Guru

Jeff,

One of our users requested this.

We researched and requested our in-house dev team to set the “Minimum Number of Characters for Search” to 2 on the search widgets on the Knowledge Homepage (/nav_to.do?uri=%2F$knowledge.do) and search results page to allow for 2-character searches in the Native UI Knowledge Homepage Search.

Common Acronyms like [AP, AD, CR, DE, DM, EC, EZ, GV, GL, GT, HR, HP, IT, MS, IE, MR, Ph, NX, OS, SP, VB, VM, etc.] now all function.
Though I don’t like the idea of using 2 characters only to search, the user’s explanation for doing this are compelling.

 

I hope this helps... it's a 2 yr old post I'm reading.