Sometimes, for example if the current index is corrupted and no backups are available we have to rebuild the index. If the current index is still running and in use, i.e. it still works in some level, we cannot re-index it. For these situations, we have to make a parallel index that is indexed and after indexing taken into use.
This document describes how to create a parallel IDOL index and take it into use while keeping the current index operational.
NOTE! When talking about IDOL and parallel indexing it might mean two different things:
1. Parallel, different indexes indexing the same vault like dtSearch and IDOL.
2. IDOL's internal technique, where the same index is divided into parallel indexes.
Make sure that everybody talks about the same thing. This document is about number 1. Parallel, different indexes.
NOTE 2! Using this document requires basic understanding of IDOL components and terminology.
1. Steps to create a parallel IDOL index
1. Stop indexing manager (MFIndexingManager service) in M-Files server.
2. Copy and rename the IDOL index folder (usually named "Combined") in path C:\Program Files\M-Files\Server Vaults\Indexes. Rename it to the same as the new index registry name.
3. Remove the contents of the folder including subfolders you just created in 2.
4. Copy the IDOL index settings in from M-Files server's registry. The easiest way to do that is to Export the index key branch (in my case C_B91D75EF-A924-4583-A7BA-2A8F3C5614C3).
5. Modify the exported .reg file. Modify index registry name into something new (e.g. into C_B91D75EF-A924-4583-A7BA-2A8F3C5614C3_new). Then, import (double click) the file to the registry.
6. Go back to the registry (e.g. C_B91D75EF-A924-4583-A7BA-2A8F3C5614C3_new) and add RegSz, named as "Path". The value is the path to the corresponding index folder e.g. C:\Program Files\M-Files\Server Vaults\Indexes\C_B91D75EF-A924-4583-A7BA-2A8F3C5614C3_new
7. Start indexing manager > M-Files starts to index the new index.
8. After the indexing is finished, there will be two time stamps in the file IndexRebuild.txt located in M-Files folder that was emptied in the number 6. The latter timestamp is the time indexing was finalized.
Alternatively, you can check the M-Files indexing queue in following way. Note, that instructions below are for IDOL 10.9. IDOL 12.x differs in a way it only includes one file IndexCLog.log.
a. MetaData: Open file IndexMLog.log inside a folder "M-Files" in M-Files server's IDOL index folder (e.g. C:\Program Files\M-Files\Server Vaults\Indexes\combined\M-Files) and get the number from values parameter.
b. Run following query in SQL Server Management Studio against M-Files database:
FROM [Sample Vault].[dbo].[OBJECTTYPEITEM]
where [VERSIONFORMDI] > number you got from the IndexMLog.log
The result tells how many objects are in the queue to index MetaData.
c. FileData: Open IndexFLog.log from the same location and get the number.
d. Run following query in M-Files database:
FROM [Sample Vault].[dbo].[DOCUMENTFILE]
where [VERSIONFORFDI] > number you got from the IndexFLog.log
The result tells how many objects are in the queue to index FileData. Note, that this might show 0 if the FileData indexing is not started yet. With configuration in IDOL 10.9 the MetaData is indexed first and then the FileData.
In IDOL 12.x MetaData and FileData are being indexed simultaneously, so there is only one file to check: IndecCLog.log.
9. When you want to start to use the new index, change "ActiveCombinedIndex" to the new (e.g. ActiveCombinedIndex (reg_sz) = C_B91D75EF-A924-4583-A7BA-2A8F3C5614C3_new) and take the vault offline and back to online (located in HKEY_LOCAL_MACHINE\SOFTWARE\Motive\M-Files\[version]\Server\MFServer\VaultOptions\[vault GUID]).