Rebuilding Search Indexes

This command rebuilds the search indexes for all instances. Rebuilding indexes can be a lengthy process and takes significant system resources. The initial process is less time-consuming than rebuilding after the full system implementation. It is recommended that you run subsequent rebuilds during off hours so that the process does not impede your work flow.

On this page

Rebuild search indexes

Note: You can rebuild the search index either for all instances on the Installation Settings tab, or for a single instance from the instance tab. Archer recommends that you rebuild the search index for one instance at a time from the instance tab.

  1. From the Start menu, select the Archer Control Panel.
  2. From the Instance Management list, double-click the instance for which you are rebuilding the search index.
  3. Log onto the queuing server specified in the Archer Control Panel.
  4. Stop the Archer Queuing Service.
  5. Perform the following command against your Archer Instance Database (you must have database owner privileges to the database):

      IF EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_tblSearchMessageContent_tblSearchMessageQueue]') AND parent_object_id = OBJECT_ID(N'[dbo].[tblSearchMessageContent]'))

      ALTER TABLE [dbo].[tblSearchMessageContent] DROP CONSTRAINT
      [FK_tblSearchMessageContent_tblSearchMessageQueue]

      GO

       

      TRUNCATE TABLE dbo.tblSearchMessageContent

       

      TRUNCATE TABLE dbo.tblSearchMessageQueue

       

      ALTER TABLE [dbo].[tblSearchMessageContent] WITH CHECK ADD CONSTRAINT
      [FK_tblSearchMessageContent_tblSearchMessageQueue] FOREIGN KEY([message_id])

      REFERENCES [dbo].[tblSearchMessageQueue] ([message_id])

      GO

       

      ALTER TABLE [dbo].[tblSearchMessageContent] CHECK CONSTRAINT
      [FK_tblSearchMessageContent_tblSearchMessageQueue]

      GO

  6. Delete existing index files including the instance ID folder in which they reside. You can find this folder through the Archer Control Panel. The Search Index rebuild process, when complete, recreates this folder structure. The following example shows the syntax for deleting the index files and instance ID 50000:

    Combine the search index path and instance ID into C:\ArcherIndexes\50000:

    Search Index Path

    Instance Information

  7. Start the Archer Queuing Service.
  8. Open the Archer Control Panel, and select the Instance name.
  9. Click Rebuild Search Index. The rebuild process is complete when the result of the following query (run on your instance database) is zero:

      SELECT COUNT(*) FROM dbo.tblSearchMessageQueue smq WHERE smq.priority_type_id = 3

  10. Note: If you have multiple Archer instances running in one environment, the indexing process starts with the first instance, and then proceeds forward. The indexing is a single threaded process. For example, if you have instances 50000 and 50001, ensure that the index finishes rebuilding for 50000 before proceeding to 50001.