I am using recoll to index my files locally and so far it works really well. However, I'd like to have the paths be relative to the recoll.conf or recoll index directory so that I can move the files around as I see fit.
Is this possible?
The user manual states the following bit about using relative paths in your dir: definitions.
The field syntax also supports a few field-like, but special, criteria:
dirfor filtering the results on file location (Ex:dir:/home/me/somedir).-diralso works to find results not in the specified directory (release >= 1.15.8). Tilde expansion will be performed as usual (except for a bug in versions 1.19 to 1.19.11p1). Wildcards will be expanded, but please have a look at an important limitation of wildcards in path filters.Relative paths also make sense, for example,
dir:share/docwould match either/usr/share/docor/usr/local/share/doc
Beyond that capability and the ability to search on relative directories, I so no mention of any other methods for anchoring the indexing to the directory where the config file resides.
One idea that may work would be to create a symbolic link from the directory where your configuration file resides to say the top level of your system, or where ever you want the indexer to reference as its "TOP". You could then specify the symbolic link's path as your dir: path in your configuration file.
$ ln -s /path/to/top/of/index /etc/recoll/somelink
Assuming recoll would work with this symbolic link as its "TOP" you could basically use the symbolic link as a external configuration item that could "absorb" the variable nature of your path as you moved the recoll database around, but still allow for the indexing to be valid.
dir:/etc/recoll/somelink
This would have to be tested out though to confirm that it would work. It's unknown to me whether recoll honors symbolic links within the path like this, or determines the physical location and uses that instead, when constructing its indexes.