Global search in ServiceNow treats the words you type as an AND search by default, so a record has to contain all terms to appear. Uppercase AND, OR and NOT change this, a minus sign or exclamation point placed directly before a word removes it, quotation marks match an exact phrase, and percent sign and asterisk act as wildcards.
Why a plain query narrows results
When you type more than one word into the global text search field, the system joins the words with AND unless you place OR or NOT between them. A query such as email server down therefore looks for records that contain email, server and down. Each word you add is another condition a record must meet, so a longer query can return fewer matches, not more. That is the opposite of what many people expect from a search box.
Results are still ranked. The results page orders records by document score, so the strongest matches appear first within each table. The ranking does not relax the AND rule, though: a record that misses one term does not appear at all.
Boolean operators and the case rule
Boolean operators are case-sensitive. The system recognizes uppercase AND, OR and NOT as operators, while Or and or are treated as ordinary search terms. The query email OR password therefore finds records containing either word. The query email or password searches for three terms joined by AND, and the word “or” is matched as text like any other word.
OR also has a symbol form. The vertical bar works the same way, so a search for a phrase followed by a bar and a single term returns records containing either one. Operators can be combined with quoted phrases, which lets you describe a set of alternatives precisely rather than hoping the ranking surfaces the right record.
The Boolean operators work in three places: the global text search field, Knowledge Base search, and text searches within a list.
One detail matters if you build filters rather than typing queries. The condition builder creates a different operator, written as .or., for fields other than Keywords. That operator can return different results from an OR typed into a text search, so the same logic may not produce the same record set in both places.
Excluding terms with NOT, minus and the exclamation point
NOT excludes records that contain the term after it. Three forms do the job: the word NOT, a minus sign, and an exclamation point. The minus sign and the exclamation point must immediately precede the word, so the search email !Joe removes records mentioning Joe. A space between the symbol and the word changes the result. The search email ! Joe includes Joe.
NOT must be a standalone word. The query atom NOT ion removes records containing ion, but the query NOTION is read as a search for the word notion. Keep the operator separated from the words on either side.
There is one hard limit. The NOT operator cannot be used to exclude all terms in a search. A query consisting only of NOT “10 minutes” returns no results, because there is nothing positive for the exclusion to act on. Pair an exclusion with at least one term you want to find.
Exact phrases and wildcards
Wrap words in quotation marks to search for an exact phrase of one or more words, which is how a multi-word error message or product name can be found without matching its parts scattered across a record.
Wildcards handle variations in spelling and word endings. The percent sign matches any one character in its position, so te%t finds words such as text or test. The asterisk matches zero or more characters, so pl*d finds words such as planned or placed. Wildcards can sit anywhere in a search string, and more than one can appear in the same word, so %ff%r* covers words such as affordable, effort and offering.
Wildcards have three limits worth knowing before you rely on them. They work only with multi-character words, so a single letter or a very short term gives little to match against. Zing does not expand the percent sign or the asterisk when it looks up synonyms of a search term; in that step they are treated as literal characters. The behavior differs by interface. Global text search and list search support wildcards directly. An administrator has to enable wildcard search for Knowledge Base. A list search needs the search field set to text before a wildcard text search runs. In list fields, wildcards are read as list or auto-complete wildcards instead.
Where the operators apply
The search options are split across several interfaces. Global search finds records across multiple tables from one field in the Next Experience unified navigation. Search a list, using the for text option in the list title bar on indexed tables, searches all records for matching field values. For the wider list view concept, see List view in ServiceNow. Knowledge Base searches knowledge articles. Boolean operators work in global text search, Knowledge Base search and text searches within a list.
How the results page groups matches
On the Next Experience interface, global search returns a Search Results page grouped by search source. The page shows a title, the search field with your current terms, a link back to the page you searched from, and a total result count. Each table gets its own preview list. By default that preview shows a limited number of matching records, ranked by document score, and the preview shows the fields from the table’s text_search list view.
A link to all table results appears when the total number of matches is larger than the preview limit, and it opens a filtered list view. On the Core UI interface, results arrive as they are generated, and a progress bar shows what percentage of tables have been searched. Results there are grouped by search group rather than by search source.
Junk filter and short terms
Zing has a junk filter that can be switched on or off for each table. When it is on, Zing does not index or search two-digit numbers or single-character words, with the exception of Chinese or Japanese characters. A search for a two-digit code therefore returns nothing from the filtered table, because that number was never indexed. Short codes, initials and one-letter values are the usual cases where this shows up. If a short term matters for a table, check the filter setting for that table before assuming the record is missing.
Knowledge Base search and the OR fallback
Knowledge Base search handles the default AND differently. If the AND search returns poor results, the search is re-run with OR automatically. Administrators can configure the Knowledge Base to always use OR by setting the glide.knowman.search.operator system property. That choice changes what every Knowledge Base user gets, so it is an administrator decision rather than a personal search habit. For the wider picture, see a plain-language guide to ServiceNow knowledge management.
Frequently asked questions
Why does adding a word to a global search reduce the number of results?
Terms without OR or NOT between them are joined with AND. Each extra word is one more condition a record must satisfy, so a record missing any one of them drops out of the results.
Does lowercase “or” work as an operator?
No. Uppercase OR is the form recognized as an operator. Or and or are treated as ordinary search terms, so the query is matched as text.
How do I leave a word out of a search?
Use NOT as a standalone word before the term, or place a minus sign or exclamation point directly against the term with no space. A search made only of exclusions returns nothing, so include at least one term you want to find.
Can I search for an exact phrase?
Yes. Wrap the words in quotation marks. The search then matches the phrase of one or more words as a unit.
Why does a search for a single letter or a two-digit number return nothing?
When the junk filter is enabled for that table, two-digit numbers and single-character words are not indexed or searched, except Chinese or Japanese characters. Check the table’s junk filter setting.
Do wildcards work in all search fields?
They work in global text search and list search. An administrator has to enable wildcard search for Knowledge Base. In a list search the search field must be set to text, and wildcards in list fields are read as list wildcards instead.