How to find items by indexed path and location in DEVONthink?

I am struggling to craft a search to find items that are:

  1. Written in Markdown.
  2. In the Root of the database “staff”.
  3. Real path is ~/Library/Mobile Documents/com~apple~CloudDocs/Journals/CareRegister.

Condition 1 is easy and with Condition 2 I attempted:

kind:markdown scope:personal

but this gives me not only the documents in the root database but also all documents further down the group hierarchy.

Plus I have no idea how to write Condition 3: Real path on file system is ~/Library/...

Any help appreciated!

Background: These documents are indexed in my iCloud Drive and by accident I must have logically moved them to the root of the database, but on the file system they are of course still in the iCloud Drive.

Use a Smart Group instead of a toolbar search and exclude subgroups.

Cool, that definitely solves the subgroup problem. Thanks!

What about the check for a specified indexed path? Anybody knows how to do that? I looked – hopefully thoroughly – through the list in the Smart Group dialog:

However I couldn’t find anything suitable…

Sort by path and then manually find what you need

Thanks. That does the trip for me.