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?

1 Answer 1


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:

dir for filtering the results on file location (Ex: dir:/home/me/somedir). -dir also 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/doc would match either /usr/share/doc or /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.

Possible hack

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.


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.

  • Thanks - I saw a bunch of people doing the symbolic link hack. My workflow is to checkout from git to /tmp, make changes, and push my changes back to the physical disk wherever that might be. I use a git commit hook to update the index. My setup works fine unless I move the workspace to a different directory than /tmp. It seems I will have to live with that.
    – Walter
    Sep 13, 2014 at 12:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .