OBLYTECH Logo
OBLYTECH Logo

AI Search Suggestions: Tables, Auto-Complete Types and Exclusions

Search suggestions in AI Search come from records the system keeps about past searches. A scheduled job turns those records into suggestion rows, each application chooses which suggestion types appear, and exclusion entries block words or patterns from being suggested. This page covers the tables, the suggestion types and the exclusion rules.

How saved searches become suggestions

Each search a user runs is saved with its query, its results and the application it came from. A scheduled build job reads those records and writes suggestions that later searchers see as they type. A pruning job then removes the lowest-rated rows, and administrators can review the saved data to tune each stage. The Zing text engine uses the same saved data to produce its own search suggestions.

The three tables behind the suggestions

Table What it holds Columns that matter most
Search Event One row for each search and its results Search query, Has results, Click rank, Refinements, Language
Search Event per source One row for each data source a search queried Search query, Source, Has results, Created
Search Suggestion Generated suggestions and their scores Application ID, User group, Language, Score, Source

The Search Event table holds one row per search, while the per-source table holds one row per data source. A search across several tables therefore creates one event row and several source rows. These are system tables, so the Reporting module excludes them by default, and reporting on them needs a separate step.

Suggestion rows are kept apart by user group, so suggestions from internal users are not shared with external users, and the reverse also holds. They are tied to their source as well. A suggestion from the Service Portal is not offered in Now Mobile.

Score is the suggestion rank. A higher score means a more relevant suggestion, and it reflects how often people selected that suggestion. Click rank works differently. It records the highest listing position among the results clicked in one search. A value of 0 means the user clicked no result or chose a Genius Result answer card.

Auto-complete suggestion types in AI Search

When an AI Search application configuration is created, it is populated with auto-complete suggestion types. Each type is a suggestion reader group with a section header shown in the search field and one or more readers that produce the suggestions.

Suggestion type What it displays Default section header Readers included
Popular Search Reader Group Query suggestions from searches by all users of the application Popular searches Popular Query Reader
Recent Search Reader Group Query suggestions from the user’s previous searches Recent searches User History Reader
Search-based Suggested Results Reader Group Titles and tables for results matching the typed terms Suggested Search Based Suggestion Reader
Suggested Query Reader Group A mix of query and result suggestions None Popular Query Reader, User History Reader, User Search Term Reader
Suggested Result Reader Group Results the user selected in earlier searches Suggested results Personal Click Reader
User History Reader Group The current query plus earlier matches for the input Recently viewed User History and Click Reader, User Search Term Reader

The Popular Search, Suggested Result and User History groups are not linked to a new configuration by default, so link them when you want their suggestions to appear.

The search-based group applies the source filters, stop word and synonym dictionaries, and result improvement rules from the linked search profile. The group uses the linked profile’s stop word and synonym dictionaries, so those dictionaries are part of how its suggestions are produced.

A trailing space changes how the last term is read. Typing “act ” treats the word as a literal term, while “act” with no space is a wildcard prefix that also matches action and activated. Catalog item results open in Service Catalog, knowledge articles open in Knowledge, and other results open in form view.

Configuring, removing and relinking a suggestion type

Open the Autocomplete Suggestions related list on a search application configuration under All > AI Search > Search Experience > Search Applications. Editing a type requires the search_application_admin role. The Suggestion Reader Group form has four settings:

  • Section Header. The heading shown above suggestions of this type.
  • Order. The display sequence when several types share the same click-in mode.
  • Suggestion Limit. The maximum number of suggestions of this type shown at once.
  • Click-in Mode. When selected, suggestions appear once the user selects the empty search field. When cleared, they appear as the user types.

Remove from Search Application disables a type without deleting it. Add Existing on the related list restores it. A configuration cannot link two types that share the same reader and click-in mode, and the system shows an error if you try.

Excluding search strings with the exclusion list

Some strings should not become suggestions. Examples include opaque reference codes, identifiers such as a social security number or phone number typed into a search, and offensive words. The Search Suggestion Exclusion List [sys_search_suggestion_blacklist] holds the words and regular expression patterns that block them. Each entry has a Phrase, a Language (an ISO 639-1 code such as en, ignored for patterns), a Description explaining its purpose, an Active flag and a Type that marks it as a word or a pattern.

The base system includes English words and language-independent patterns. Activating Chinese, Czech, Dutch, Finnish, French, German, Hebrew, Hungarian, Italian, Japanese, Norwegian, Polish, Portuguese, Russian, Spanish, Swedish, Thai or Turkish adds that language’s excluded words. A single pattern can cover a whole class of strings, such as any search containing several separate numbers. A broad pattern can also remove suggestions you want, which is why each pattern should be tested.

Testing regular expression rules before relying on them

The m2m_blacklist_search_suggestion table links each exclusion entry to the suggestions it removed. Its Suggestion column shows the eliminated string.

  1. Add the pattern with a clear description.
  2. Enter words that match it in a portal search field.
  3. Run Build Search Suggestions with Execute Now.
  4. Group the relations table by Exclusion List to see what each pattern removed.
  5. Check that it removed the intended strings and no more.
  6. Set Active to false, rebuild, and confirm the removals disappear. Then revise the pattern and repeat if needed.

Patterns follow Java regular expression syntax, so the test is the practical check on whether an expression does what you intended.

Scheduling the build, pruning and retention

Build Search Suggestions runs daily by default. Edit its Run and Time fields under All > System Definition > Scheduled Jobs, and use Execute Now to run it immediately.

Pruning keeps the Search Suggestion table at 500,000 rows or fewer. It runs weekly by default and removes the lowest-rated rows once the limit is reached. Its form has Run (choose On Demand for manual runs), Day, Time zone, Time, Repeat interval and Conditional, and the visible fields change with the Run value. In repeat intervals, day 01 is Sunday.

The age of the source data is set separately. Suggestions are built from search strings recorded in the last 180 days by default. That limit is held in an Auto Flush record for the Search Event table, where Age in seconds defaults to 15,552,000. Longer periods increase table size and disk use. Changing the value requires the ais_admin role.

Limiting access and measuring search quality

Two roles control suggestions for individual users. The cannot_read_suggestions role hides suggestions from the user. The suggestion_exempt role excludes that user’s searches from suggestion generation. Assign the exempt role only when a specific privacy or security reason calls for it. Assign either role under All > User Administration > Users, using the Roles related list and Edit. Suggestions do not show who ran the original search. The Search Suggestions application does not support domain separation.

Start the quality review with searches where Has results is false, since those queries returned nothing. Add the missing content, add synonyms, or leave off-topic queries alone. Then check three numbers. Average Click rank, where lower is better because the top results are the ones people pick. The click-through rate, which is rows with a non-zero click rank divided by total rows. And average Refinements, the sort and filter actions taken to narrow results, where lower is better. The per-source table with Has results false shows which data source came up empty. This analysis requires the ais_admin role.

Frequently asked questions

Which searches feed the suggestions?

Saved searches within the age limit, which defaults to 180 days. Searches from users with the exempt role are ignored, and suggestions matching an active exclusion entry are removed.

How often do new suggestions appear?

The Build Search Suggestions job runs daily by default. Change its Run and Time fields to alter the schedule, or use Execute Now to run it straight away.

Can I switch off a suggestion type without losing its setup?

Yes. Use Remove from Search Application on the type. Its settings remain, and Add Existing restores it.

How do I keep a sensitive term out of suggestions?

Add the word or a pattern to the exclusion list with a clear description, then test it using the steps above to confirm it removes the strings you intended and no others.

Can I hide suggestions from a particular user?

Yes. Assign the cannot_read_suggestions role under All > User Administration > Users to hide suggestions from that user. Assign the suggestion_exempt role only when a specific privacy or security reason calls for it, since it excludes that user’s searches from suggestion generation.

For the wider search behavior, see the AI Search overview. Result cards that can appear alongside suggestions are covered on the AI Search Genius Results page.