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.
Reasons to use either the indexing thread or the recollindex command:
Starting the indexing thread is more convenient, being just one click away.
The recollindex command has more options, especially the one to reset the index (-z).
The recollindex command will not take down your GUI if it crashes (a rare occurrence, but who knows...)
The recollindex command uses setpriority/nice to lower its priority while indexing (it will also use ionice when this becomes more widely available), the thread can't do it, else it would also slow down the user/search interface.
If the recoll program finds no index when it starts, it will automatically start indexing (except if canceled).
The recollindex 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 thread can be equivalently stopped from the menu.
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. The indexing will restart at the interruption point (the full file tree will be traversed, but files that were indexed up to the interruption and are still up to date will not need to be reindexed).
recollindex has a number of other options which are described in its man page.
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>&1Or, 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.