Refreshes a text index.
REFRESH TEXT INDEX text-index-name ON [ owner.]table-name [ WITH { ISOLATION LEVEL isolation-level | EXCLUSIVE MODE | SHARE MODE } ] [ FORCE { BUILD | INCREMENTAL } ]
An incremental refresh does not remove deleted entries from the text index. As a result, the size of the text index may be larger than expected to contain the current and historic data. Typically, this issue occurs with text indexes that are always manually refreshed with the FORCE INCREMENTAL clause. On automatically refreshed text indexes, historic data is automatically deleted when it makes up 50% of the total size of the text index.
REFRESH TEXT INDEX MarketingTextIndex ON GROUPO.MarketingInformation FORCE BUILD;
When using the FORCE clause, you can examine the results of the sa_text_index_stats system procedure to decide whether a complete rebuild (FORCE BUILD), or incremental update (FORCE INCREMENTAL) is most appropriate.
You cannot execute the REFRESH TEXT INDEX statement on a text index that is defined as IMMEDIATE REFRESH.
For MANUAL REFRESH text indexes, use the sa_text_index_stats system procedure to determine whether the text index should be refreshed. Divide pending_length by doc_length, and use the percentage as a guide for deciding whether a refresh is required. To determine the type of rebuild required, use the same process for deleted_length and doc_count.
This statement cannot be executed when there are cursors opened with the WITH HOLD clause that use either statement or transaction snapshots.