koniu writes

Specifying multiple ----dir: ---- yields no results:

$ recoll -t "foo dir:archive/cam" | wc -l
$ recoll -t "foo dir:archive/hack" | wc -l
$ recoll -t "foo dir:archive/hack dir:archive/cam" | wc -l

Query as passed to xapian (a hint there?):

$ recoll -t "foo dir:archive/hack dir:archive/cam"
Recoll query: ((((foo:(wqf=11) OR foos) FILTER (XParchive PHRASE 2 XPhack)) FILTER (XParchive PHRASE 2 XPcam)))
0 results

Using explicit ----OR ---- doesn’t fix the problem:

$ recoll -t "foo dir:archive/hack OR dir:archive/cam"
Recoll query: ((foo:(wqf=11) AND ((<alldocuments > FILTER (XParchive PHRASE 2 XPhack)) FILTER (XParchive PHRASE 2 XPcam))))
0 results

Same issue with python api. Recoll version 1.18.1

medoc writes

You are right, there is no way currently to search multiple directories. Originally, only one "dir:" was allowed, and then it was found that "dir:something -dir:other -dir:other2" was useful, so multiple clauses where allowed, but it’s always AND (or AND_NOT).

Actually, you are right that an OR would be useful too, but I can only add it to the TODO for now…

koniu writes

That’s a shame :(.

You might want to edit the docs [1] since they do say (in one place, I missed the limitation mentioned above):

dir:recoll dir:src -dir:utils -dir:common
This would select results which have both recoll and src in the path
(in any order), and which have not either utils or common.

medoc writes