Can a Database rebuild cause the loss of tags

My DEVONthink crashed on me a couple of weeks ago which lead to a number of things to recover from it including the rebuilding of the database. I noticed that all my tagged notes were no longer tagged and that the tags themselves had disappeared.

As I understand it, DT stores tags in two ways:

  1. In the database itself (where they also function as the groups/folders that items are stored in), and
  2. As OpenMeta tags (which can be seen by other applications).

If rebuilding the database caused DTPO to lose your tags, I suspect at least one of two things happened:
a. The pre-rebuild groups/folder structure was lost. This would be pretty dramatic: all of the folders would be gone.
b. Folders that had been set to work as tags had tagging turned off.

Explanation of b:
When you first create a database using the default settings, only those folders in the “Tags” folder function as tags. To change this, control-click on the database in the sidebar and choose Database Properties. Uncheck “Exclude Groups from Tagging.” All your folders will then function as tags (and show up on the tags bar). To then prevent particular folders from functioning as tags, select the folder, click on Info, and then check Tagging (in the “Exclude from …” section of the Info pane).

As for OpenMeta tags, IIRC DT doesn’t automatically write its tags as OpenMeta tags. But it does automatically read OpenMeta tags, using them as DT tags. So the following sequence of events might have happened:

  1. You indexed some files with OpenMeta tags, and DT used this to build its initial list of tags.
  2. You rearranged things in DT, which changed the DT tags.
  3. These changes were not written to the OpenMeta tags.
  4. Optional: You did something with the files in another application, which did something with the OpenMeta tags.
  5. When you rebuilt the database, DT re-read the OpenMeta tags, losing the changes you had made in #2.

My advice here would be to tread carefully when moving between DT and other OpenMeta-aware applications. I believe there are examples of Applescripts to automatically update OpenMeta tags in the Scripts forum.

Note that OpenMeta tags can interact in unexpected ways with Time Machine:

I hope something in that helps! I personally found the learning curve of DT’s tags to be rather steep, and I created some significant havoc when I first started using it.

Thanks for all the input. Yes, not only did I find the learning curve around tags steep (odd as so many programs I use utilize tagging and it isn’t anything to me other than a way of organizing and finding things) but I’ve found the learning curve around DEVONthink generally pretty steep. However, once you’re on to it it is very flexible and powerful. I love the scanning of documents capability and the new sync functionality that’s being implemented. I haven’t gotten on to the AI capability yet and continue to file things the old fashioned way - manually!