如何重建全文索引?

时间:2009-07-07 11:27:51

标签: sql-server full-text-indexing

需要重建mssql全文索引 问题是 - 我需要确切知道何时完成工作。因此 - 只需致电:

ALTER FULLTEXT CATALOG fooCatalog
REBUILD WITH ACCENT_SENSITIVITY = OFF  

不起作用或我做的事情有点不对劲。 :/

有什么想法吗?

3 个答案:

答案 0 :(得分:18)

您可以通过查询indexing properties来确定全文索引的状态:

SELECT FULLTEXTCATALOGPROPERTY('IndexingCatalog', 'PopulateStatus') AS Status
  

表格全文填充状态

Displays the population status of the full-text indexed table.

The possible values are as follows:

0 = Idle.

1 = Full population is in progress.

2 = Incremental population is in progress.

3 = Propagation of tracked changes is in progress.

4 = Background update index is in progress, such as automatic change
     

跟踪。

5 = Full-text indexing is throttled or pause

答案 1 :(得分:4)

因为我无法评论Magnus'回答(缺乏声誉),我会在这里添加。我发现根据this MSDN link,MSDN上存在信息冲突。根据我引用的链接,PopulateStatus有10个可能的值列出如下:

0 = Idle.

1 = Full population in progress

2 = Paused

3 = Throttled

4 = Recovering

5 = Shutdown

6 = Incremental population in progress

7 = Building index

8 = Disk is full.  Paused.

9 = Change tracking

答案 2 :(得分:1)

SELECT name, case FULLTEXTCATALOGPROPERTY(name, 'PopulateStatus') 
    when 0 then 'Idle'
    when 1 then ' Full population in progress'
    when 2 then ' Paused'
    when 3 then ' Throttled'
    when 4 then ' Recovering'
    when 5 then ' Shutdown'
    when 6 then ' Incremental population in progress'
    when 7 then ' Building index'
    when 8 then ' Disk is full.  Paused.'
    when 9 then ' Change tracking' end AS Status
from sys.fulltext_catalogs