How to determine if an item is in database

I would like to export some items that are in the database only, how does one tell using search or whatever?

It’s not clear what you want to do.

Are you referring to AppleScript’s “tell” here?

If I have indexed items only, or moved items into database only, how can I determine that state?
Preferably using what is already in DT as I hate writing Applescripts.

Search indexed items:


Search imported items:


The way I understood it from the docs is if I import an item a copy is placed in the database and indexed.
If I index only, the item is left in its original location.

Either way, it is indexed, and it would have to be to make use of DT metadata.

So, if that is correct, what is the meaning of not indexed?

Yeah you’re right, that’s a bit confusing:

  • DEVONthink creates an “index” for each record to make it searchable


  • One can “index” files and folders (instead of importing them)

This means files or folders are imported into the database package.

Either way, “indexed” or “imported”, DEVONthink always creates an index of your records.

So, the name of the attribute should have been ‘import’ and not ‘index’, now it makes sense in that context.

You can also use the File Location dropdown in the Info filter pane.

1 Like

File location is not in the advanced search

Something clearly wrong here.
I setup a test group and did a drag of a folder then a cmd-drag of a folder.
The dragged folder was imported and index and copy left in Finder.
The cmd-drag folder was imported and indexed and removed from the Finder.

I set up a smart folder
But the results show tagged items in addition to group items.

Tags are a special kind of a group, you have to exclude them

kind:!tag item:!indexed

If you search with this query in the whole database you’ll see the “Tags” group, regardless of using “kind:!tag”. That’s a bit confusing too, I think.

As far as I know there’s no built-in way to exclude the “Tags” group. However you could work around this by setting e.g. the “Comment” of the “Tags” group to a unique string in the info inspector and then exclude this string in your search.

If you set the comment of the database’s

  • inbox
  • tags group
  • annotation group

to “EXCLUDE BUILT IN GROUPS”, then this query

kind:!tag comment!=EXCLUDE BUILT IN GROUPS item:!indexed kind:group

should give you all groups that are imported.

Correct. It’s in the Filter panes. See Tools > Filters.

Thanks, I’ll try that

This info filter pane looks interesting, but I can’t seem to find it. I did go to Tools->Filter->Info and nothing appears to happen in the UI - at least nothing which pops up this calendar and file location based on indexed vs. “unindexed”. Could I have a view setting that is preventing this from appearing? Or am I missing something. Thanks.

It appears at the bottom of the Navigate sidebar on the right side of the main window.

1 Like

Still having problem defining a smart group criteria that shows items only indexed and not in database.

I might be wrong here, but are the two criteria: “kind is any document” AND “item is indexed”?

What have you done that didn’t work? What is the symptom you see that makes you conclude what you did didn’t work? This makes helping easier.

Why are you creating a smart group instead of using the File Location dropdown in the Info filter?

I think I see it now, if a item is imported it is IN the database the kind is not indexed, if the item was indexed its kind is indexed but not in the database. Kind of confusing, If I would have seen a kind of “imported” it would have been clearer. I dsicovered this by setting up a criteria of indexed and added the path column, it then was obvious what was going on.