Stop words
Summarize
Summary of Stop words
Stop words are common terms like articles, conjunctions, pronouns, and prepositions that appear frequently in indexed records but do not contribute meaningful results in searches. By defining these terms as stop words in dictionaries linked to search profiles, you can enhance search precision and relevancy by removing these terms from user queries.
Show less
Stop Word Dictionaries and Configuration
You can create multiple stop word dictionaries for different languages and link them to search profiles. Only stop words from published dictionaries linked to the query’s language are considered for removal. If no dictionary is linked for a search language, the default English stop word dictionary is used.
Stop words can be single words or multi-word phrases, which are removed only when query terms match their exact order and proximity. The system ignores case and punctuation by default, but you can enable case sensitivity or punctuation sensitivity per dictionary.
There is a default limit of 256 characters on stop word term length, which can be increased via a system property, though caution is advised due to potential memory impact.
Language and Search Profile Considerations
- Stop word removal is language-dependent and requires a dictionary linked to the search profile for that language.
- Only one stop word dictionary per language can be linked to a search profile.
- Supports all languages activated in your ServiceNow instance.
Interactions with Other Search Features
- Genius Results: Evaluated before stop word removal.
- Result Improvement Rules: Triggers evaluated before removing stop words.
- Synonyms: Stop words in synonym definitions are retained during query expansion.
- Typo Handling: Misspelled stop words are auto-corrected instead of removed.
- Wildcard Operators: Stop words are ignored during wildcard expansions.
Managing Stop Word Dictionaries
- Create and publish dictionaries to activate stop words for linked search profiles.
- Link dictionaries to search profiles for language-specific stop word removal.
- Clone dictionaries for easier management and customization.
- Unlink or delete dictionaries only if they are not linked to any search profile.
Publishing a stop word dictionary applies its active stop words and settings in all linked profiles. Publishing a search profile updates dictionary links but does not update dictionary content or settings.
Stop words remove search query terms that don't produce meaningful results. Improve search precision and relevancy by configuring stop word dictionaries and defining stop words.
Stop words are common terms that appear on a large proportion of indexed records. Examples of such terms can include articles, conjunctions, personal pronouns, and prepositions. By defining these terms as stop words, you can improve search precision and result relevancy for users.
You can define stop words in the default stop word dictionary for a search profile, or create your own stop word dictionaries linked to search profiles. Create and publish stop words for each dictionary. Publish the dictionary to make your stop words take effect for searches that use linked search profiles.
You can delete stop word dictionaries that aren't linked to any search profiles.
Stop word usage in search
When a search query includes a term defined as a stop word, AI Search removes the term from the search query.
For example, a stop word might remove the term my from a search query for upgrade my laptop. This modified search query only matches records containing the more relevant terms upgrade and laptop.
Conditions for stop word eligibility
- It must be active.
- The stop word dictionary that includes it must be published.
- Its length doesn't exceed the dictionary term-length limit.
| Condition | Result |
|---|---|
| The search profile specified for the search query links to a published stop word dictionary for the search query's language. | The system only considers stop words from the linked stop word dictionary.
As an example, suppose a search application's search profile links to a French stop word dictionary. When a user searches in French in this application, only stop words from the linked French stop word dictionary are eligible for removal from the search query terms. |
| The search profile specified for the search query doesn't link to a published stop word dictionary for the search query's language. | The system only considers stop words from the default (English) stop word dictionary.
As an example, suppose a search application's search profile has no linked Spanish stop word dictionary. When a user searches in Spanish in this application, only stop words from the default (English) stop word dictionary are eligible for removal from the search query terms. |
For more details on language support in stop word dictionaries, see Language dependence.
Dictionary term-length limit
By default, AI Search ignores stop word terms that exceed 256 characters in length. You can override this default limit by adding the query.maxDictionaryTermLength system property. The integer value of this system property indicates the maximum allowable character length for stop word and synonym dictionary terms.
Multi-word phrases
A stop word can include either a single word or a multi-word phrase. AI Search removes multi-word phrases from the search query when the query terms exactly match the order and proximity of the phrased words in the stop word definition. If a user searches with these words in a different arrangement, no term removal occurs.
For example, the following table describes AI Search stop word removal behavior for a stop word that includes the multi-word phrase retirement account.
| Search query terms | Stop word removal behavior |
|---|---|
| my retirement account | AI Search removes the terms retirement account from the search query. |
| my bank retirement account | AI Search removes the terms retirement account from the search query. |
| my account retirement | AI Search doesn't remove any terms from the search query. |
| my retirement bank account | AI Search doesn't remove any terms from the search query. |
Case sensitivity
By default, AI Search ignores letter case when comparing stop words with search query terms. You can enable case sensitivity for a stop word dictionary. This option affects all stop words defined in the dictionary.
When case sensitivity is enabled, stop words in the dictionary only match search query terms or phrases that include the same combination of uppercase and lowercase letters.
For example, if you define a RAID stop word in a dictionary with case sensitivity enabled, AI Search ignores the search query term RAID but treats the search query term raid normally.
Punctuation sensitivity
By default, AI Search ignores punctuation when comparing stop words with search query terms. You can enable punctuation sensitivity for a stop word dictionary. This option affects all stop words defined in the dictionary.
When punctuation sensitivity is enabled, stop words in the dictionary only match search query terms or phrases that include the same punctuation.
For example, if you define a one-half stop word in a dictionary with punctuation sensitivity enabled, AI Search removes the search query term one-half but doesn't remove the search query term one half.
Language dependence
AI Search supports stop word dictionaries for all languages activated in your instance. For the list of languages you can activate, see Activate a language.
You can only link one stop word dictionary per language to a given search profile.
Interaction with other search features
The following table describes interactions between stop words and other search features.
| Feature | Interaction with stop words |
|---|---|
| Genius Results | If a search query term that matches a Genius Result configuration's Term trigger is defined as a stop word, AI Search evaluates the trigger before removing that stop word from the search query.
When computing Q&A Genius Results for a search query, AI Search ignores stop words in the query. |
| Lemma and Unicode normalization | If a search query term is defined as a stop word, AI Search removes that term without normalizing it. |
| Result improvement rules | If a search query term that matches a result improvement rule's Query trigger is defined as a stop word, AI Search evaluates the rule trigger before removing the stop word from the search query. |
| Synonyms |
If a synonym definition includes a term defined as a stop word, AI Search retains that term when checking whether the synonym expands a search query. For example, suppose you define as and a as stop words and SAAS↔︎software as a service as a synonym.
|
| Typo handling |
If a misspelled search query term is defined as a stop word, AI Search auto-corrects that term normally instead of removing it. AI Search ignores terms defined as stop words when determining an auto-correction for a misspelled search query term. For example, if you define email as a stop word, AI Search doesn't offer email as an auto-correction when you search for emial. |
| Wildcard operators | When expanding search terms that contain % or * wildcard operators, AI Search ignores terms defined as stop words. For example, suppose you define the and their as stop words. A search for the* won't expand to match the or their, but will still match non-stop word terms such as there and these. |
Publishing stop word dictionaries
Publishing a stop word dictionary makes its settings and active stop words take effect in all linked search profiles.
Publishing a search profile updates the profile's stop word dictionary links but doesn't update the dictionary's settings or active stop words in AI Search.