Configure a text index group to search across multiple tables
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 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.
- 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.
- 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.
Procedure
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.