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:

item:indexed

Search imported items:

item:!indexed

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

and

  • 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 https://share.polymicro.net/1605889473.png
But the results show tagged items in addition to group items.
https://share.polymicro.net/1605889531.png

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