sergiu_panaite
ServiceNow Employee
ServiceNow Employee

If your text search for a particular keyword doesn't find a record you know that it contains that keyword here is a quick way of dumping all the text index words for a particular record (run below code in Background Scripts):

var table = "incident";

var sysID = "e8caedcbc0a80164017df472f39eaed1";           //sys_id of the record I think it contains the searched keyword

new GlideTSUtil().dumpDocument(table, sysID);

The output shows me in this case:

[0:00:00.029] Script completed in scope global: script

Tokens in incident with sysId e8caedcbc0a80164017df472f39eaed1 (docId=812)

@0 3267 inc0000003

@1 4444 0000003

@3 3270 itil

@4 3276 user

@6 4910 progress

@8 94750 aktiv

@9 94751 bearbeitung

@11 1783 high

@13 95205 hoch

@15 4679 critical

@17 95208 kritisch

@19 87 joe

@20 88 employee

@22 4827 wireless

@23 3453 access

@24 3409 down

@25 16 my

@26 1211 area

@28 3677 network

@30 28 just

@31 3898 moved

@32 18 from

@33 3284 floor

@34 3284 floor

@35 16 my

@36 4553 laptop

@37 27 cannot

@38 3467 connect

@39 3620 any

@40 4827 wireless

@41 3677 network

@43 4536 notify

@45 80800 nicht

@46 94754 benachrichtigen

@48 4236 incident

@50 4910 progress

@52 94750 aktiv

@54 1783 high

@56 95205 hoch

@58 1402 acme

@59 1394 north

@60 734 america

@62 75 beth

@63 78 anglin

@65 1783 high

@67 95205 hoch

@69 4338 normal

@71 4338 normal

@73 1003 324

@74 1225 south

@75 356 state

@76 1472 street

@77 2467 salt

@78 1589 lake

@79 1430 city

@80 2477 ut

@82 3677 network

@84 95009 netzwerk

Now, if the keyword is text indexed (part of the list above) and text search on it still doesn't work, most probably it is marked as a stop word (System Definition -> Text index Stop Words).

1 Comment