1. medoc
  2. recoll
  3. Issues
Issue #113 resolved

cannot search multiple dir:s

created an issue

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

Comments (5)

  1. medoc repo owner

    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...

  2. Log in to comment