Switch from Import to Index of scattered documents

I have come across the following interesting behaviour in switching a large number of documents from being imported to being indexed, in the case where each document is in a different group.

The documents all have a common identifier in their names, so they can be selected collectively in the search window after searching on that identifier. They can then be dragged into a Finder folder and deleted from the DT search window, ready to be indexed back into the database from the Finder folder. But the documents were scattered across different groups originally, and need to be indexed back into their original groups, so what to do?

It turns out that if you simply index them into the Inbox of the database (through a cmd-ctrl drag and drop), then DT creates replicants of each of the indexed documents, one in the Inbox and one back in its original group! Simply delete the replicants in the Inbox and you are left with indexed documents in their original groups where you previously had the imported ones.

I am not sure if this behaviour is well known or not, but it is new to me (and I’m not sure how DT knows where the exported document originally came from in the database, once it is in the OS X file system and deleted from the database). I trust that it is intentional and not just a happy accident that will break in future!

You probably have enabled groups for tagging. When you export a file, that file has a tag whose name is the group where the file resided. When you then index that exported file, it is replicated back to the old group because it has that groups tag. This is how groups enabled for tagging works.

So if I have a file ABC inside group XYZ and I export ABC, there’s an XYZ tag assigned to that file. When I index the exported instance of ABC in a database’s Inbox it is also replicated to XYZ. Working as designed.

If you don’t want the behavior, then disabled tagging for a group using the contextual menu, or for the whole database using database properties.

It is not an accident, but replicants are fragile. I wouldn’t rely on it. I would use the script that turns replicants to duplicates, and then delete the instance from the Inbox. I would also test this thoroughly before believing me :open_mouth:

Ah yes, that is the explanation. I do indeed have groups enabled for tagging. Many thanks korm, and for the tip about converting to duplicates.

Overall, it’s a very neat trick, and it was totally unexpected – DEVONthink never ceases to surprise.