Index storage

The default index location is the xapiandb subdirectory of the Recoll configuration directory, typically $HOME/.recoll/xapiandb/ on Unix-like systems or C:/Users/[me]/Appdata/Local/Recoll/xapiandb on Windows. This can be changed via two different methods (with different purposes):

  • For a given configuration directory, you can specify a non-default storage location for the index by setting the dbdir parameter in the configuration file. Use this method to keep the configuration directory in its default location, and use another location for the index, typically because of disk occupation or performance reasons.

  • You can specify a different configuration directory by setting the RECOLL_CONFDIR environment variable, or using the -c option to the Recoll commands. In turn, the related index would be stored either under the configuration directory, or elsewhere if dbdir is locally set. This method would typically be used in special cases to index different areas of the file system to different indexes. See the section about configuring multiple indexes for more detail.

There are quite a few more parameters which can be set in the configuration file itself for tailoring Recoll data storage. They are described in a section of the configuration chapter.

The size of the index is determined by the size of the set of documents, but the ratio can vary a lot. For a typical mixed set of documents, the index size will often be close to the data set size. In specific cases (a set of compressed mbox files for example), the index can become much bigger than the documents. It may also be much smaller if the documents contain a lot of images or other non-indexed data (an extreme example being a set of mp3 files where only the tags would be indexed).

Of course, images, sound and video do not increase the index size, which means that in most cases, the space used by the index will be negligible compared to the total amount of data on the computer.

The index data directory (xapiandb) only contains data that can be completely rebuilt by an index run (as long as the original documents exist), and it can always be destroyed safely.