Any Quick Way to Identify Orphaned Spotlight Databases?

Hi all-

Based on some recent Spotlight searches, I think I have some DTPO Spotlight databases that are no longer connected with valid .dtBase2 files. So I get spurious hits in my Spotlight searches.

As all this info is named with the appropriate UUIDs, is there any way of determining the name of the database (for example) without having to load all my .dtBase2 files?

Looking for a quick way to spot the orphinks…

Thanks, Charles

Open the databases you really want to keep. Use this script that I made for another project. You’ll get a list of the UUIDs and plain-English names for those databases. Then look at the folders inside ~/Libary/Caches/Metadata/DEVONthink Pro 2. These folders have the names of their corresponding database UUIDs. Process of elimination from that point. :stuck_out_tongue:

tell application id "com.devon-technologies.thinkpro2"
	set all_databases to every database
	set these_links to "Database links" & return
	repeat with this_database in all_databases
		set this_link to "ID: " & (id of this_database as string) & " " & (name of this_database as string) & " " & ("x-devonthink-item://" & uuid of this_database as string)
		set these_links to these_links & this_link & return
	end repeat
	set theDatabase to the current database
	create record with {name:"Open Databases", type:rtf, rich text:these_links} in incoming group of theDatabase
	
end tell

Hi Korm-

Thanks. It was much faster to do a little shell script hack on the metadata itself, rather than load all those megabytes of data…

I found two duplicate Inbox indexes, which I would have expected from a problem I had a while back. More mysterious were the three empty indexes.

Also, does anyone know if the new DT Spotlight Quicklook feature is supposed to work with .eml files? I can view actual .eml files, but not indirectly through the metadata cache.

Best, Charles