Global Text Search

From SNCWiki

(Redirected from Global Search)
Jump to: navigation, search
Searches
Related Topics

Contents

Overview

The search box is located in the upper right of the banner. It can be accessed using the mouse, or using a key-stroke (Access Key + S)


Image:GlobalSearch1.png


Search results are grouped into logical collections called search groups. You can use the search groups you have roles to use. Within each search group, results are divided by table. There are four out of box search groups, customizable by an admin:

  • Tasks: e.g., Incidents, Change Requests, Problems
  • Policy: e.g., Business Rules, UI Policy, Client Scripts
  • People & Places: e.g., Users, Groups, Locations, Companies
  • Knowledge & Catalog: Knowledge Base and Service Catalog

Knowledge and Service Catalog results are displayed as they are in their respective applications, while other tables' results are displayed in list format.

For example, searching for "network" might return the following results:


Image:GlobalSearch3.png


Controlling the results you see

Text Search Groups

Navigating to System Definition -> Search Groups displays the record list of the groups that global search results will be organized in. These groups can be modified as filters. For instance, by default the Policy group returns results for active scripts. Changing the conditions in the Policy record can return results for all scripts, rather than just active ones.


Collapse or Expand results

You can collapse/expand each search group and search table as you wish, and your settings are used for subsequent searches if you choose. For example, if you are rarely interested in Policy or Core Items search results, but still wish to search them each time, you can collapse them.


Deselect results

If you do not want to search some groups or tables, you can deselect a search group or table on a per-user basis. Your preference is saved for subsequent searches. To deselect a search group, uncheck its checkbox on the search results page:


Image:GlobalSearch4.png


If you click a search group's link (e.g., the blue "Tasks" link in the above screenshot), you will get a dialog where you can deselect specific tables in each group:


Image:GlobalSearch5.png


Preferences

Click the "Search tips and preferences" link to set the following personal Global Text Search preferences:

  • Use remembered expand / collapse preferences - specifies whether you want the collapse state of any search groups/tables remembered for your next search. e.g., when checked, if you collapse the search results for the "People & Places" search group, it will be collapsed on your next search. When unchecked, all groups/tables are expanded for every search.
  • Show list of tables with no search matches - specifies whether or not you wish to see a summary of tables that had no search matches. e.g., "No matches for Requests, Catalog Tasks, Tickets"
  • Show selectable search groups - hides or displays the search group checkbox row
  • Show groups with no search matches - if unchecked, hides a search group if it returns no matches. If checked, you get a placeholder row telling you there were no matches for that group.


Image:GlobalSearch5a.png


Stop Words

Stop words are common words that are not indexed because they are not meaningful in search results. Articles, conjunctions, personal pronouns, and prepositions are examples of stop words that are not used in keyword searches. The out-of-box system defines a number of these stop words in a configurable list in the glide.lucene.stop_words property.

Note
Note: Removing a stop word from the list and updating the property does not make that word immediately searchable. Only those tables reindexed after the word was removed from the stop word property allow the use of that word in a keyword search.

Administration

Role required
Functionality described here requires the Admin role.

Users with the "text_search_admin" role can administer the Global Text Search capability, configuring search groups and tables. They will see links to edit search groups where other users will not, in the upper-right of the search results page and in the dialog you get when you click a Search Group link next to its checkbox at the top of the search form.


Properties

Navigate to System Properties --> Global Text Search to customize properties. There you can do the following:

  • Enable or disable the capability entirely
  • Specify which roles can use Global Text Search (default is itil,text_search_admin,admin)
  • Specify which tables will not show up as options when defining a search table in a search group. Out-of-box examples are sys_audit, sysevent, syslog, sys_journal_field, etc., tables that are typically used for system or maintenance purposes and are not practical for use in a global text search context. Text indexing these tables may not be a good idea.
  • Specify a different view be used by default in lieu of the text_search view
  • Number of matches returned per table. Default is 10, and users have the option to click through to see all results for a specific table. If a user doesn't get what they're looking for in the first 10 matches, they'll either refine their search or click through to all results for the table.


Image:GlobalSearch6.png


Search box

The "ui_global_text_search" UI Macro provides the text search input in the upper-right corner of the top frame.


Search Groups

To administer search groups, navigate to System Definition --> Search Groups or click the "Edit Search Groups" link at the top of the search results page. You can also edit a specific group from its link in the search group checkbox row. For each search group, you can specify:

  • Name: the label users will see
  • Roles: required to use the search group
  • Active: whether or not the search group is available for use
  • Searched: whether or not the search group is searched by default. If not, users can select it
  • Order: the order in which search groups are listed and results are returned
  • Description: appears in a tooltip on the search results page
  • Text Search Tables: a related list of the tables searched in this search group


Search Tables

To administer search tables for a group, edit the group. The search tables are a related list on the Search Group form. For each search group, you can specify:

  • Search group: the search group for this search table
  • Table: the table to be searched
  • Optional label: e.g., you may want to display "Contacts" instead of "Users" for the sys_user table for a search group used by your Sales team
  • Active: whether or not the search table is available for use
  • Searched: whether or not this table is searched by default. If not, users can select it
  • Order: the order in which search groups are listed and results are returned
  • Conditions: an optional default filter to use for this table's search results


Performance

Each search table you have active in a search is an additional query that is executed. If you find that searches are taking too long to execute, look at your active search groups and tables and make sure you don't have any that are not necessary. e.g., if you never have a need to return Change Tasks in your search results, deactivate that search table in the Tasks search group. If only one group of users needs to search that table, set up a search group just for that group of users that includes that search table. Have other users use a different search group that doesn't contain that search table.


List View Displayed

If there is a text_search view of a list being displayed in the search results, that view will be used. Otherwise the Default view will be used.

If you do not have a text_search view of a list and you want one, you can create it.

An admin can specify a different view be used by default in lieu of the text_search view by navigating to System Properties --> Global Text Search.


Attachments

The Text Index Attachment Plugin enables searching for attachments directly from the global search. Out-of-box, this functionality is enabled for the Knowledge Base table, but can be enabled for any table.


Regenerating a Corrupt Index

Typically, a corrupt index will regenerate itself. If, for whatever reason, the system does not start the regeneration process for you, you will need to issue a script command to delete the existing index and regenerate it. For example, to regenerate the task text index, the following script could be used as a background script:

   var indexer = new Packages.com.glide.lucene.TextIndexEvent();
   indexer.createIndex("task", "my_email@service-now.com");

Note the email address should be changed to the email address which should receive the notification when the index has been completed. What this does is create an event to be processed by the index handler so the script will complete almost instantly. As soon as the event is picked up by the scheduled job (see below), you can check the Component Status page and see that the index is being generated. An entry will also appear in the log; for example:

   10/28/09 15:36:19 (521) worker.1 worker.1 TextIndexGenerator: Text index generation starting for: task

As each extended table completes, it will be logged:

   10/28/09 15:37:13 (213) worker.1 worker.1 [0:00:01.462] TextIndex generation complete for: problem, rows indexed: 11

Once all the extended tables are completed, the Component Status page entry will be updated to "completed" and a final log entry will be made which shows how long the process took:

   10/28/09 15:37:20 (794) worker.1 worker.1 TextIndexGenerator: Text index generation complete for: task, in: 0:01:02.669
Personal tools
book creator
Print/export