Search
Welcome to M-Files Empower – our new support experience. We'd love to hear what you think!Give feedback
Home/Support and troubleshooting/Troubleshooting/FAQ/General questions

Checking the progress of dtSearch index rebuild

Last updated on 5 January 2022

Admin
Search

Overview

Rebuilding the full-text search index should be carried out in your document vault periodically to ensure optimal performance of the search function. See https://www.m-files.com/user-guide/latest/eng/Maintenance.html#vault_maintenance__rebuild_search_index

This maintenance task is triggered and run in the background and is completed without needing any admin intervention. However, checking the actual progress of the index rebuild task is not available in M-Files Admin. Checking the status is possible for vaults, which are configured with SQL Server database backend by following these steps.

Solution

The status check requires observing entries in M-Files log files and running SQL queries against the vault database. This check is carried out separately for both metadata and filedata

1.     Browse to the M-Files index path which is typically under:

C:\Program Files\M-Files\20.3.8876.7\Server\Server Vaults\My Vault\Indexes\Filedata\M-Files\IndexLog.log
 

2.     Under there open the file IndexLog.log. The path corresponding to metadata is:

C:\Program Files\M-Files\20.3.8876.7\Server\Server Vaults\My Vault\Indexes\Miledata\M-Files\IndexLog.log

and the path corresponding to filedata is

C:\Program Files\M-Files\20.3.8876.7\Server\Server Vaults\My Vault\Indexes\Filedata\M-Files\IndexLog.log
 

3.     In the file you will find two rows, e.g:

20.3.8876.7
{"timestamp":{"timestampType":"integer","timestamp":{"integer":{"values":["14620735"]}}},"changeTracking":["0"],"remoteIndexName":""}


Take note of the number after "values", i.e. 14620735. This is the current progress "timestamp" of the index.

4.     Open Microsoft SQL Server Management Studio and browse to the database of your document vault

5.     Run the following SQL queries and insert the timestamp number from stop 3. Take note of the result, which these queries return. For metadata the query is:

USE [My Vault]
GO
SELECT count(*)
FROM [dbo].[OBJECTTYPEITEM]
where [VERSIONFORMDI] > 14620735


and for filedata:

USE [My Vault]
GO
SELECT count(*)
FROM [dbo].[ DOCUMENTFILE]
where [VERSIONFORFDI] > 30469553

 

6.     From the results returned by these queries, you can determine how many objects are still pending to be indexed. Ideally, you will see a number 0 - Or a number close to it when there are recent object additions which have accumulated the queue for objects still to be indexed.

In this case it can be determined that rebuilding of the full-text search index has completed.

To make sure the process has completed without issues check for any M-Files indexing error entries in the Windows Event Viewer's Application log. Any errors found therein may indicate a failure of index rebuilding and need to be addressed to successfully complete the process. In case of unresolved errors preventing the rebuild and proper functionality of searches, provide the results to M-Files Customer Support at support@m-files.com for further assistance.

Still need help?

On this page