Multiple indexes

Multiple Recoll indexes can be created by using several configuration directories which are typically set to index different areas of the file system. A specific index can be selected for updating or searching, using the RECOLL_CONFDIR environment variable or the -c option to recoll and recollindex.

When working with the recoll index configuration GUI, 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.

Additional configuration directories (beyond ~/.recoll) must be created by hand (mkdir or such), the GUI will not do it. This is to avoid mistakenly creating additional directories when an argument is mistyped.

A typical usage scenario for the multiple index feature would be for a system administrator to set up a central index for shared data, that you choose to search or not in addition to your personal data. Of course, there are other possibilities. There are many cases where you know the subset of files that should be searched, and where narrowing the search can improve the results. You can achieve approximately the same effect with the directory filter in advanced search, but multiple indexes will have much better performance and may be worth the trouble.

A recollindex program instance can only update one specific index, and it will only use parameters from a single configuration (no parameters are ever shared between configurations when indexing).

Multiple indexes can queryied concurrently, either from the GUI or the command line. When doing this, there is always a main configuration, from which both configuration and index data are used. Only the index data from the additional indexes is used (their configuration parameters are ignored).

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.

If a set of multiple indexes are to be used together for searches, some configuration parameters must be consistent among the set. These are parameters which need to be the same when indexing and searching. As the parameters come from the main configuration when searching, they need to be compatible with what was set when creating the other indexes (which came from their respective configuration directories).

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 are described in the linked section.

The different search interfaces (GUI, command line, ...) have different methods to define the set of indexes to be used, see the appropriate section.