[SOLVED] Searching in multiple org-roam databases

Hi,

I’m currently reading the book (“How to take smart notes”), and in accordance with its suggestions I want to separate my project notes from my permanent notes and my reference notes.

I’ve seen the trick with using .dir-locals.el to get many directories to work as org-roam databases. Applying this trick, I can get a local database and get searches to work within it (but not getting access to “the outside”). But when using org-roam-find-file from “the outside”, org-roam (as expected) only looks among my “main notes”.

Is there any way to include my secondary database in the search as well?

I hope I’m not missing a previous answer for this.

I have one org-directory and db, in which I have separate sub-directories: work and personal. No need to deal with two db files. Optionally, you can set org-roam to treat sub-directories as tags, so that you can visually see them, and use them as a filter with completion of org-roam-find-file, and friends.

I would suggest to try this approach, and see if it works for you.

1 Like

OK, that works very well. I don’t know why I’d gotten the impression that org-roam-directory had to point directly at the directory where my notes were located, when it is in fact enough that the note files are somewhere under the org-roam-directory in the file hierarchy.

I removed the .dir-locals.el file and just used different subdirectories instead.

1 Like