Help
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
britt_champeau
ServiceNow Employee
ServiceNow Employee

Searching in HI or any ServiceNow instance can feel like trying to find a grain of salt in a bucket of sand. As ServiceNow's Knowledge Engineer, one of my major focuses is debugging Zing, which means digging through the Search Log for problematic queries. After sifting through tens of thousands of searches, I've identified a few patterns I believe may be helpful to those of you who feel like giving up on that grain of salt:


  1. Search strings that include the word 'null' do not return results.
  2. Text Index Stop Words can kill a search.
  3. Queries that contain mid-phrase/ mid-word punctuation do not consistently return results even when there is an exact match like an error.


1. 'Null'-ified Searches

When you are looking at any table and you filter out all the empty fields, the breadcrumb says to include results where the field !=NULL. Search uses the same types of filters as tables and to a table query 'null' refers to a non-existent value, so including the search term 'null' is roughly the same as asking for results that don't exist.  


When filtering the Knowledge>Edit table for Article Title contains null> Audience = Public, there are 6 results:


Screen Shot 2014-07-09 at 10.52.17 AM.JPG

However, when searching Knowledge> View for null, no results are returned:


Screen Shot 2014-07-09 at 10.57.18 AM.JPG

To be clear, it doesn't matter if 'null' is the only word or a term in an exact string phrase. The only time I saw results was when it was not surrounded by spaces. For example, "NullPointerException" returns multiple results:


Screen Shot 2014-07-09 at 10.58.43 AM.JPG

While "Email address converted to null" returned 0 results:


Screen Shot 2014-07-09 at 11.00.04 AM.JPG

For more information on this issue, review the following HI Knowledge Article: KB0539504.


2. Text Indexes Stop Word Searches

Roughly a month ago, we were experiencing issues when searching for a specific product documentation article titled "Transferring Update Sets." Unfortunately, though the Short Description/ Article Title of the article was an exact match to the query, no results were returned. After a baffling few weeks, I finally checked the Text Index. The word 'update' was actually on the kb_knowledge Ts Index Stop Word Table. Always be aware of what words you have entered as Text Index Stop Words, ensuring you have checked the table-specific stop words.  


To check for table-specific stop words, open System Definition> Text Indexes, then filter for your table. For Knowledge Search, select table kb_knowledge. At the bottom of the kb_knowledge Ts Index form, there is a related list with the Ts Index Stops for your table. If one of the words in your query is on this list, you may want to consider removing it.

Screen Shot 2014-07-09 at 11.00.46 AM.JPG

After 'update' was removed from the list of Ts Index Stops for kb_knowledge, multiple results were retrieved: Transferring Update Sets Search. Allowing the search to check for exact matches before removing stop words from the query can resolve this issue.

 

3. Mid-Phrase/ Mid-Word Punctuation Punctuates Results

Search query "We are using "Default SLA workflow' to send the notification after 50%, 75% and 100% completion of," returns 0 results, but changing the apostrophe after 'workflow' to a quotation mark and removing the comma after '50%' returns multiple results.

 

More Search Information to Come!

Hopefully this information helps you to not only find that grain of salt, but to turn it into a block of salt sitting on top of the bucket. To see future blogs, follow me on the Community. I'll keep the search issues coming as they are identified.

 

For additional information related to Search and Zing, see Administering Zing Text Search and Document Scoring in the ServiceNow product documentation.

3 Comments