2.4. Periodic indexing

2.4.1. Starting indexing

Indexing is performed either by the recollindex program, or by the indexing thread inside the recoll program (use the File menu). Both programs will use of the RECOLL_CONFDIR variable or accept a -c confdir option to specify the configuration directory to be used.

If the recoll program finds no index when it starts, it will automatically start indexing (except if canceled).

It is best to avoid interrupting the indexing process, as this may sometimes leave the index in a bad state. This is not a serious problem, as you then just need to delete the index files and restart the indexing. The index files are normally stored in the $HOME/.recoll/xapiandb directory, which you can just delete if needed. Alternatively, you can start recollindex with option -z, which will reset the database before indexing.

2.4.2. Using cron to automate indexing

The most common way to set up indexing is to have a cron task execute it every night. For example the following crontab entry would do it every day at 3:30AM (supposing recollindex is in your PATH):

30 3 * * * recollindex > /tmp/recolltrace 2>&1

The usual command to edit your crontab is crontab -e (which will usually start the vi editor to edit the file). You may have more sophisticated tools available on your system.