Multiple Recoll indexes can be created by using several configuration directories which would typically be set to index different areas of the file system.
A specific configuration can be selected by setting the
RECOLL_CONFDIR
environment variable or giving the
-c
option to recoll and
recollindex.
The recollindex program, used for creating or updating indexes, always works on a single index. The different configurations are entirely independent (no parameters are ever shared between configurations when indexing).
All the search interfaces (recoll, recollq, the Python API, etc.) operate with a main configuration, from which both configuration and index data are used, and can also query data from multiple additional indexes. Only the index data from additional indexes is used, their configuration parameters are ignored. This implies that some parameters should be consistent among index configurations which are to be used together.
When searching, the current main index (defined by
RECOLL_CONFDIR
or -c
) is always active. If this is
undesirable, you can set up your base configuration to index an empty directory.
Index configuration parameters can be set either by using a
text editor on the files, or, for most parameters, by using the
recoll index configuration
GUI. In the latter case, the configuration directory for which parameters are
modified is the one which was selected by
RECOLL_CONFDIR
or the -c
parameter, and there is no way to
switch configurations within the GUI.
See the configuration section for a detailed description of the parameters
Some configuration parameters must be consistent among a set of multiple indexes used together for searches. Most importantly, all indexes to be queried concurrently must have the same option concerning character case and diacritics stripping, but there are other constraints. Most of the relevant parameters affect the term generation.
Using multiple configurations implies a small level of command line or file manager usage. The user must explicitly create additional configuration directories, the GUI will not do it. This is to avoid mistakenly creating additional directories when an argument is mistyped. Also, the GUI or the indexer must be launched with a specific option or environment to work on the right configuration.
Initially creating the configuration and index:
mkdir /path/to/my/new/config
Configuring the new index can be done from the
recoll GUI, launched from the
command line to pass the -c
option
(you could create a desktop file to do it for you), and then using the
GUI index configuration tool
to set up the index.
recoll -c /path/to/my/new/config
Alternatively, you can just start a text editor on the main configuration file:
someEditor
/path/to/my/new/config
/recoll.conf
Creating and updating the index can be done from the command line:
recollindex -c /path/to/my/new/config
or from the File menu of a GUI launched with the same option (recoll, see above).
The same GUI would also let you set up batch indexing for
the new index. Real time indexing can only be set up from the GUI
for the default index (the menu entry will be inactive if the GUI
was started with a non-default -c
option).
The new index can be queried alone with:
recoll -c /path/to/my/new/config
Or, in parallel with the default index, by starting
recoll without a -c
option, and using
the External Indexes tab in the preferences dialog, which can be
reached either trough:
→ → or
→ . See the GUI external indexes
section for more details.