Vault a faster way to reindex

What is the fastest way to reindex the whole Vault?


-------------------
 
Here's another idea that would speed up the process of reindexing the whole Vault.  It is more complicated but would be faster.
 
On a test system, install the latest version of Vault, version 7.  This version of Vault has a new indexing structure that is multi-threaded and is faster the the old index structure
 
Perform the reindex
 
Then you would need to run a program to convert the new indexes into the old format, and put them on the production Vault server which is still running Vault 5.5.
 
1) install Vault 7 on a new test server.  After installation in complete, stop Vault services on the new server
2) copy profiles.ini / database.ini from production Vault to the new server.  Edit indexerd.ini on the new server so that it has the following settings (to optimize performance)
 
[Indexer1]
ThreadCount=1
CacheSize=1536
FullFlush=1440
FlushPeriod=60
QueueSize=200000
oscache=1
vaultkeycompression=1
 
3) Make sure that the following vault directories on the testing environment are empty (they should be if it's a new isntall):
a) download
b) pagedata
c) docdata
d) work
e) process
f) index
 
4) copy all the DRDs from production Vault to the new server
 
5) edit the database.ini file on the new server adding
modedefault=2 
to each database.  If you don't do this then Vault wil not use the new faster method of indexing!  i.e.,
 
[Providencia]
modedefault=2
 
[Providencia_F2]
modedefault=2
 
[XMLProvidencia]
modedefault=2
 
6) in the testing environment create a copy of each DRD file, but instead of the .DRD extension, give it a .index extension.  i.e., copy *.drd *.index
7) move these .index files to a directory outside of the Vault folders where you can access them later
8) start the Vault services
 
9) move batches of .index files to server\process by pool so files associated with a group of accounts is loaded in succession (this step is not strictly necessary, but loading the accounts in this order will reduce disk i/o and will result in faster results.)
 
10) Once all the files are indexed, you will have to use the indexcheck command to convert the newly created index from the new format into the old DRI format that is compatible with Vault 5.5:
 
use indexcheck -dbinfo | find ".dri" to get a list of all the DRIs that need to be converted.  Then run the indexcheck :copy command to convert each DRI:
 
For Providencia database:
a) indexcheck -mode:2 providencia/account.dri -copy:index\providencia\account.dri,0 -noprint
b) indexcheck -mode:2 providencia/invlink.dri -copy:index\providencia\invlink.dri,0 -noprint
c) indexcheck -mode:2 providencia/name.dri -copy:index\providencia\name.dri,0 -noprint
d) indexcheck -mode:2 providencia/NOCUENTA.dri -copy:index\providencia\NOCUENTA.dri,0 -noprint
e) indexcheck -mode:2 providencia/NOMBRE.dri -copy:index\providencia\NOMBRE.dri,0 -noprint
f) indexcheck -mode:2 providencia/NOFAC.dri -copy:index\providencia\NOFAC.dri,0 -noprint
g) indexcheck -mode:2 providencia/RIF.dri -copy:index\providencia\RIF.dri,0 -noprint
h) indexcheck -mode:2 providencia/FECFAC.dri -copy:index\providencia\FECFAC.dri,0 -noprint
i) indexcheck -mode:2 providencia/LEGACY.dri -copy:index\providencia\LEGACY.dri,0 -noprint
 
For Providencia_F2 database:
a) indexcheck -mode:2 providencia_f2/account.dri -copy:index\providencia_f2\account.dri,0 -noprint
b) indexcheck -mode:2 providencia_f2/invlink.dri -copy:index\providencia_f2\invlink.dri,0 -noprint
c) indexcheck -mode:2 providencia_f2/name.dri -copy:index\providencia_f2\name.dri,0 -noprint
d) indexcheck -mode:2 providencia_f2/NOCUENTA.dri -copy:index\providencia_f2\NOCUENTA.dri,0 -noprint
e) indexcheck -mode:2 providencia_f2/NOMBRE.dri -copy:index\providencia_f2\NOMBRE.dri,0 -noprint
f) indexcheck -mode:2 providencia_f2/NOFAC.dri -copy:index\providencia_f2\NOFAC.dri,0 -noprint
g) indexcheck -mode:2 providencia_f2/RIF.dri -copy:index\providencia_f2\RIF.dri,0 -noprint
h) indexcheck -mode:2 providencia_f2/FECFAC.dri -copy:index\providencia_f2\FECFAC.dri,0 -noprint
i) indexcheck -mode:2 providencia_f2/LEGACY.dri -copy:index\providencia_f2\LEGACY.dri,0 -noprint
j) indexcheck -mode:2 providencia_f2/TPODCTO.dri -copy:index\providencia_f2\TPODCTO.dri,0 -noprint
 
For XMLProvidencia database:
a) indexcheck -mode:2 xmlprovidencia/account.dri -copy:index\xmlprovidencia\account.dri,0 -noprint
b) indexcheck -mode:2 xmlprovidencia/invlink.dri -copy:index\xmlprovidencia\invlink.dri,0 -noprint
c) indexcheck -mode:2 xmlprovidencia/name.dri -copy:index\xmlprovidencia\name.dri,0 -noprint
d) indexcheck -mode:2 xmlprovidencia/NOCUENTA.dri -copy:index\xmlprovidencia\NOCUENTA.dri,0 -noprint
e) indexcheck -mode:2 xmlprovidencia/NOMBRE.dri -copy:index\xmlprovidencia\NOMBRE.dri,0 -noprint
f) indexcheck -mode:2 xmlprovidencia/NOFAC.dri -copy:index\xmlprovidencia\NOFAC.dri,0 -noprint
g) indexcheck -mode:2 xmlprovidencia/RIF.dri -copy:index\xmlprovidencia\RIF.dri,0 -noprint
h) indexcheck -mode:2 xmlprovidencia/FECFAC.dri -copy:index\xmlprovidencia\FECFAC.dri,0 -noprint
i) indexcheck -mode:2 xmlprovidencia/LEGACY.dri -copy:index\xmlprovidencia\LEGACY.dri,0 -noprint
j) indexcheck -mode:2 xmlprovidencia/TPODCTO.dri -copy:index\xmlprovidencia\TPODCTO.dri,0 -noprint
 
Now you should have a set of DRI and DRR files that are compatible with the production system.
 
To install to production:
 
1) stop vault services on production Vault
2) rename the production vault index directory from 'index' to old.index'
3) copy index directory from testing environment to production environment
4) start vault services and test.  If there is any problem, you can switch the old indexes back by stopping the vault service and renaming the index directories
 
Please note that if you have ingested any new files in production since the time that you created the index in your testing environment that you will need to manually .INDEX those files in production again for them to be viewable in production.
 
UPDATED:  September 25, 2017