# \[SOLVED\] Searching in multiple org-roam databases

**URL:** <https://org-roam.discourse.group/t/solved-searching-in-multiple-org-roam-databases/1291>\
**Category:** Troubleshooting\
**Created:** [February 18, 2021, 4:45pm UTC](https://org-roam.discourse.group/t/solved-searching-in-multiple-org-roam-databases/1291 "2021-02-18T16:45:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![joncol](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/joncol/32/619_2.png) [@joncol](https://org-roam.discourse.group/u/joncol)\
**Post date:** [February 18, 2021, 4:45pm UTC](https://org-roam.discourse.group/t/solved-searching-in-multiple-org-roam-databases/1291/1 "2021-02-18T16:45:42Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [February 18, 2021, 7:41pm UTC](https://org-roam.discourse.group/t/solved-searching-in-multiple-org-roam-databases/1291/2 "2021-02-18T19:41:47Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![joncol](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/joncol/32/619_2.png) [@joncol](https://org-roam.discourse.group/u/joncol)\
**Post date:** [February 18, 2021, 8:17pm UTC](https://org-roam.discourse.group/t/solved-searching-in-multiple-org-roam-databases/1291/3 "2021-02-18T20:17:13Z")

</div>

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.
