2.5. Periodic indexing

2.5.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 the RECOLL_CONFDIR variable or accept a -c confdir option to specify a non-default configuration directory.

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

The indexing process can be interrupted by sending an interrupt (^C, SIGINT) or terminate (SIGTERM) signal. Some time may elapse before the process exits, because it needs to properly flush and close the index. The indexing will restart at the interruption point the next time (the full file tree will still be traversed, but files that were indexed up to the interruption and are still up to date will not need to be reindexed).

After such an interruption, the index will be somewhat inconsistent because some operations which are normally performed at the end of the indexing pass will have been skipped (for exemple, the stemming and spelling databases will be inexistant or out of date). You just need to restart indexing at a later time to restore consistency.

2.5.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 > /some/tmp/dir/recolltrace 2>&1
Or, using anacron:
1  15  su mylogin -c "recollindex recollindex > /tmp/rcltraceme 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.