---
sourceDocument: Xanadu ServiceNow AI Platform Administration
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/platform-administration

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu ServiceNow AI Platform Administration

ft:clusterId :

    - platadm

bundleId :

    - platadm

workflow :

    - Platform


---

# Configure a text index group to search across multiple tables

# Configure a text index group to search across multiple tables {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 5 minutes to read

Update tables to the V4 indexing format and include them in a text index group to facilitate searching across multiple tables.

## Before you begin

Role required: ts_admin or admin

## About this task

Text index groups enable you to index and search across multiple tables.

Performing searches across multiple tables requires normalizing the tables first so the relevance scores mean the same thing for all tables. V4 indexing provides that normalization. Zing uses the [Okapi BM25](https://en.wikipedia.org/wiki/Okapi_BM25) ranking function to calculate the relevancy score of search results.

The V4 table indexing format is optimized for documentation, such as knowledge base articles. You don't need to reindex tables that use this format when you change the value of an indexing attribute, such as the weight of a
field. If you want to use the BM25 ranking function on a single table, you can convert it to the V4 format.  
To enable search across multiple tables, you:

1. Configure all of your chosen tables to use the V4 index format if they don't already use it.  
   Note:  
   In new instances, the Catalog Item \[sc_cat_item\], Knowledge \[kb_knowledge\], Social Q\&A Questions \[kb_social_qa_question\], and User \[sys_user\] tables use the V4 index format. If you upgrade your instance from a previous release, the indexing format of these tables remains the same as it was in the older release.
2. Add the tables to a text index group so they can be indexed and searched together.  
   Note:  
   You can't add the Task \[task\] table or any tables that extend it to a text index group.
{#index-multiple-tables__ol_stc_kny_qhb}

## Procedure

1. Configure the tables that you want to include in multiple table searches to use the V4 index format.  
   Note:  
   Upgrading from V3 to V4 is easy. Downgrading from V4 to V3 is more difficult and discouraged.
   1. Navigate to AllSystem DefinitionText Index Configurations.
   2. Open the record for the table that you want to upgrade to the V4 index format.
   3. If Format isn't disabled, select V4, select Submit, and then skip to step [2](https://servicenow-prod.fluidtopics.net/_Tqphpv96UK1ogrveyz4mg#index-multiple-tables__create-index-group).  
      You can choose index formatting in this step because no index exists for the table.
   4. If Format is disabled, select the Show index name record related link.  
      The disabled field means that an index already exists for the table and you must explicitly update the index format.  
      The Text Index page displays.
   5. Select the Upgrade to V4 related link, then select OK.  
      The system schedules a task to upgrade the text index from V3 to V4, enabling this table to participate in multiple-table indexing.
   {#index-multiple-tables__substeps_kdn_2ty_qhb} {#index-multiple-tables__format-index-v4}
{#index-multiple-tables__format-index-v4}
2. Create a text index group that specifies the tables you want to index together so you can search them together.
   1. Navigate to AllSystem DefinitionText Index Groups.
   2. Select New.
   3. Enter the following field values:  
      {#index-multiple-tables__table_qzv_tdt_2pb__entry__2}

      | Field | Value |
      |-|-|
      | Label | Name for the group of tables that you want to index and search together. |
      | Tables | List of tables that you want to include in the text index group. |
      [ ]

      {#index-multiple-tables__table_qzv_tdt_2pb}

      You can add tables formatted with V3 and V4 to text index groups. If you add V3 tables, the text index group remains inactive.
   4. Select Submit.
   {#index-multiple-tables__substeps_k3w_hvy_qhb} {#index-multiple-tables__create-index-group}
{#index-multiple-tables__create-index-group}
3. Configure the indexing and search attributes on tables in a text index group.
   1. Navigate to AllSystem DefinitionText Index Configurations.
   2. Select New.  
      The Text Index configuration form displays. If you already have a text index group in the list, skip to step [3.d](https://servicenow-prod.fluidtopics.net/_Tqphpv96UK1ogrveyz4mg#index-multiple-tables__select-index-group).
   3. In Applies to, select Index Group.
   4. In Index group, select the magnifying glass and select the text index group you created, then select Submit.  
      The only text index groups that display are the ones you have already created.  
      The Text Index Configuration table displays. {#index-multiple-tables__select-index-group}
   {#index-multiple-tables__select-index-group}
   5. Open the record for your text index group. {#index-multiple-tables__click-index-group}
   {#index-multiple-tables__click-index-group}
   6. On the Text Index Table Attribute Maps tab, select New.  
      The Text Index Table Attribute Map form displays. Attributes pertain to the way Zing indexes or searches individual tables in the text index group.
   7. In Table, select a table to define attributes for.  
      Only tables in the specified text index group and their child tables display.
   8. In Attribute name, select the magnifying glass and select an attribute.  
      To see the list of attributes, enter <kbd class="ph userinput">ts_configuration_attribute.list</kbd> in the application navigator. For attribute definitions, see [Zing index and search attributes](https://servicenow-prod.fluidtopics.net/cov1YoVQP8FsNSEuqNnsAg "The following dictionary attributes either affect the way Zing indexes tables or ranks search results.").
   9. In Value enter a value and select Submit.  
      Valid values depend on the attribute. For information on valid values, see [Zing index and search attributes](https://servicenow-prod.fluidtopics.net/cov1YoVQP8FsNSEuqNnsAg "The following dictionary attributes either affect the way Zing indexes tables or ranks search results.").
   10. Repeat this procedure to define additional search engine parameters for other tables in the text index group.
   11. Under Related Links, select Generate Text Index.
   {#index-multiple-tables__substeps_z4m_5hm_rhb}
4. Configure search parameters on individual table columns in the text index group.
   1. Navigate to AllSystem DefinitionText Index Configurations.
   2. Open the record for your text index group.
   3. On the Text Index Column Attribute Maps tab, select New.  
      The Text Index Column Attribute Map form displays. Attributes pertain to the way Zing indexes or searches individual table columns in the text index group.
   4. In Table, select a table to define attributes for.  
      Only tables in the text index group and their child tables display.
   5. In Attribute name, select a search engine parameter, enter a value for that parameter in Value, and select Submit.  
      To see the list of attributes, enter <kbd class="ph userinput">ts_configuration_attribute.list</kbd> in the application navigator. For attribute definitions, see [Zing index and search attributes](https://servicenow-prod.fluidtopics.net/cov1YoVQP8FsNSEuqNnsAg "The following dictionary attributes either affect the way Zing indexes tables or ranks search results.").
   6. In Column, specify the name of the column in the selected table you want to apply the search attribute to.
   7. In Value, specify the attribute's value that governs the search.
   8. Select Submit.
   9. Repeat this procedure to define additional search engine parameters for table columns in the text index group.
   10. Under Related Links, select Generate Text Index.
   {#index-multiple-tables__substeps_o3g_vsm_rhb}
5. **Optional:** Add a synonym dictionary.  
   Specifying a dictionary enables searches on the search term and synonyms of the search term, such as <kbd class="ph userinput">car</kbd> and its synonym auto. Zing provides a default synonym dictionary.
   1. Navigate to AllSystem DefinitionText Index Configurations.
   2. Open the record for your text index group.
   3. On the Index synonym Dictionaries tab, select New.
   4. In Index, select the table index to add the stop words to.
   5. In Synonym dictionary, select the dictionary to use.  
      To add a dictionary, select New and follow the procedure in [Create synonym dictionaries](https://servicenow-prod.fluidtopics.net/nI_aol1YdU2AFE6asfQ3jQ "You can create synonym dictionaries to expand Zing text searches with additional search keywords.").
   6. Select Submit.
   7. Under Related Links, select Generate Text Index.
   {#index-multiple-tables__substeps_rq1_c3n_rhb}
6. Select Update.

## What to do next

You can query the tables in the text index group for string matches using the `GlideRecord.addQuery(name, value)` or `GlideRecord.addEncodedQuery(name, value)` methods with the
`123TEXTINDEXGROUP321` reserved name. For more information about querying text index groups for string matches, see [Querying tables in script](https://www.servicenow.com/docs/access?context=c_UsingGlideRecordToQueryTables&version=xanadu&pubname=xanadu-application-development&ft:locale=en-US).
**Related concepts**   

* [Zing indexes punctuation as part of some words](https://servicenow-prod.fluidtopics.net/w7uB09y~FMmb2pFvBd6hwg "Zing indexes some punctuation marks as part of some words to improve search results for common search terms.")
* [Zing indexes some HTML elements](https://servicenow-prod.fluidtopics.net/ka_LSPsauIUfAhCQ_t7bIA "Zing indexes the contents of certain HTML elements to improve document search results. This indexing is addition to the normal indexing by word.")  
**Related tasks**   

* [Configure a table for indexing and searching](https://servicenow-prod.fluidtopics.net/ikx52T2SvdSyrAWcJbB0lA#configure-single-table-for-indexing "Enable Zing text indexing for a table to allow users to search its records for string values. Configure the table's text indexing attributes, stop words, and synonym dictionaries to control search behavior.")
* [Regenerate a text index for a table](https://servicenow-prod.fluidtopics.net/EhFB579yIrCuwIp2hhyGHA "You can regenerate a table text index when you change table stop words or display values.")
* [Remove an index](https://servicenow-prod.fluidtopics.net/xgsKH0hNHvRqe9szc3ir2A "You can remove the index for a table if you no longer want the search engine to return results for that table. This procedure also removes the index for all tables that extend the specified table.")
* [Remove an index for a specific field](https://servicenow-prod.fluidtopics.net/CSQJCQNy12hVM~sn8G3m3g "You can remove the index for a specific field in a table if you no longer want the search engine to return results for that field.")
* [Remove the text index for a child table](https://servicenow-prod.fluidtopics.net/CO6UXxVULBBlub6YaQDqtg "You can remove the text index for a child table if you no longer want the search engine to return results for that child table.")
* [Change the query mode of an indexed table](https://servicenow-prod.fluidtopics.net/PrqCDK3ZPZwBhHgu2C02BQ "Set the query mode to specify whether searches on an indexed table must match all or only some of the search terms.")
* [Enable indexing of text in multi-row variable sets](https://servicenow-prod.fluidtopics.net/h3Rx9FN5RISMSrF0Tjb9sA "Make text from multi-row Service Catalog variable sets searchable in global search.")
* [Configure tables to use the Japanese tokenizer](https://servicenow-prod.fluidtopics.net/E0EWdE3uDM7mAVWTgDS8Cw "Improve search results in Japanese language searches by configuring individual tables to use the Japanese tokenizer.")  
**Related reference**   

* [Zing index and search dictionary attributes](https://servicenow-prod.fluidtopics.net/cov1YoVQP8FsNSEuqNnsAg "The following dictionary attributes either affect the way Zing indexes tables or ranks search results.")
* [Text indexing statistics and status](https://servicenow-prod.fluidtopics.net/t0_oxn~6xib1FACmS31utg "To view text indexing statistics and status, navigate to All > System Definition > Text Indexes .")

*[\>]: and then


