Home | Appendix

Quick links: |  | Import Index Indexing and the Filesystem

|  |  | Importing & Indexing

When it comes to getting data into your databases, there are two fundamental methods to consider: importing and indexing. Import Importing copies files into the internal structure of the database. This creates a portable, self-contained database that can be moved as a single file. This is the default behavior of DEVONthink. When you drag-and-drop files or choose File > Import > Files and Folders, files are copied. This does leave the originals in the Finder, which you can choose to keep or delete. But note there is no connection between the files any longer. Editing the file in the Finder after importing has no effect on the file in the database, as the database has a copy of it. If you want to access and edit the files, do so from inside DEVONthink. If you hold the ⌘ Command key when you drag into DEVONthink, the file will be moved, not copied, into the database. If you are using File > Import > Files and Folders, you can click the Options button and enable Move Originals to Trash. Index Creates links to files outside the database. This allows more direct access to the files in the Finder by other applications or people. A common example is people using a cloud service like Dropbox and indexing folders in the local Dropbox folders. DEVONthink indexes the content and metadata for use with classification and other content-related functions, just as it does with imported items. Do note while indexing doesn't copy the contents of the files, the full text of text-based documents is stored. This can still take up a considerable amount of space. Finder files and folders can be indexed using File > Index. You can also hold ⌥⌘ while dragging and dropping into your database. When you do, you will see a curved arrow on the cursor while dragging, indicating the items will be indexed. Indexed items will have a small square Finder icon to the right of the item's name. Indexing and the Filesystem Indexing is not the default option for getting files into your databases. This is not only because importing creates a singular, portable database, but also due to some technical things that must be considered when indexing. Here are a few behaviors you should know and understand before indexing. With indexing, the integration with the filesystem is very tight. When you rename a file in DEVONthink, the file's name changes in the Finder. If you rename in the Finder, the change should be automatically reflected in the database. DEVONthink tries to keep the group in the database and the folder in the Finder in the same state. Also, if you move a non-indexed file into an indexed group or create a new file in an indexed group, the file will be moved to the external indexed folder, a process we call "deconsolidation". When indexing items into DEVONthink, you can index a file, a folder, or a parent folder containing subfolders. In the image shown, the "DEVONtech" folder is the parent folder and could be indexed with all its contents included. You could also index an individual folder, e.g., the "Data" folder, which would be treated as a parent folder for its contents. Or you could index individual files. Each of these options has specific behaviors you should be aware of, covered below. Updating indexed files: In general use, DEVONthink can usually detect filesystem changes of indexed folders and will update the indexed group in the database. However, there are two things to be aware of regarding automatic updating of indexed files. Files synced by other applications: If you are indexing files in a folder synced by another application, e.g., iCloud or Dropbox, you may need to use the File > Update Indexed Items command to manually update the indexed group. DEVONthink does this to avoid causing a discrepancy in the data for the other application. Also, a particular process may not generate a filesystem event for DEVONthink to detect a change has occurred. Individually indexed files: While it's certainly feasible to index individual files, be aware these files won't always be updated automatically. If you have an indexed file selected in DEVONthink and make external changes, the file will not show the changes in the view/edit pane automatically when you return to your database. In this case, use File > Update Indexed Items or reselect the document. You should then see the updates.
Note: In the Appendix > Hidden Preferences, you will find some settings specific to indexing: DisableAutomaticUpdatingOfItems, DisableFileSystemEvents, and DisableFileCoordination. If you'd like to control whether DEVONthink automatically moves indexed files into a database (consolidation) and moves items to the external Finder folder (deconsolidation), see the Files > General > Indexed Items settings.
Moving Indexed Items: DEVONthink stores individually indexed items by its absolute path in the filesystem. If you move an individually indexed file or folder, it will disappear when the database updates or be reported as missing. This is because the item no longer exists in the indexed location, so the absolute path points to nothing. If you move a file or subfolder inside an indexed parent group, the change should be reflected in the database or the Finder. The parent folder still exists in the same location and DEVONthink can adjust for the changed relative paths within it. While it's generally best to index fairly static locations, i.e., ones that you won't be relocating or renaming, sometimes it becomes necessary to do some housekeeping. Perhaps you are running low on space on the internal drive and need to move an indexed folder to a connected external drive. Open the Tools > Inspectors > Generic Info inspector, you can click the down arrow next to the Path title, choose Select, and select the parent folder in its new location. DEVONthink should update the stored paths to point to the Finder folder and its contents in the new location. Deleting Indexed Items: When deleting indexed items, you will see one of two warnings when you empty the database's trash, depending on how you've indexed the item. With individually indexed files or an indexed parent folder, you will see the warning above prompting you to choose whether to delete the item from the file system or just the reference in the database. In this instance, DEVONthink is prompting you to make sure you aware of the potential removal of a top level indexed item. If you delete a subgroup or file in an indexed group and empty the database's trash, you will be shown a warning there are indexed items detected in the trash. You can choose to Remove Imported Items which will not delete indexed files. Choose Remove All Items to remove both indexed and imported files when emptying the trash. Indexed files will be moved to the system trash from their location in the Finder. In this situation, DEVONthink is modifying the content of the indexed parent to ensure both the Finder and database's contents match. Duplicating Indexed Items: When you duplicate an indexed item, the behavior depends on if you're duplicating within a database or between databases. if you duplicate the item in the same database, a copy will be created in the Finder in anticipation of potential changes. If you duplicate the item into another database, no copy will be created in the Finder. However, changes made to the item - in either database - will affect both databases as the indexed item is pointing at the same item in the Finder.
Note: While you cannot replicate files between databases, the duplication of an indexed file across databases can provide you with a similar behavior. However, the files will not be marked as duplicates since duplicates are not detected across databases.
Replicating Indexed Files: Replicating indexed files within a database, individually or within parent folders, has no effect on the files in the Finder. Replicating only adds a record of another instance of the file. However, if you delete a replicant of an indexed file and empty the database's trash, this will have no effect on the files in the Finder. They will remain intact. Indexing Cloud-synced Folders: One of the common uses of indexing is to keep a local folder in a cloud-synced location, e.g., Dropbox, and have access to the files within DEVONthink. While this is certainly supported, be aware that changes made to the local folder, especially when the cloud service syncs, they may not always be detected by DEVONthink. In that instance, you can manually update the indexed group by selecting and hoisting it via the disclosure triangle or choosing the File > Update Indexed Items command. Also, you should only index local data, e.g., on the local hard drive or connected drives. DEVONthink doesn't support indexing data that resides only in the cloud. Lastly, if you are indexing content and want to sync the databases between devices, please review the Indexing and Sync section. Due to the flexibility of DEVONthink, it's possible to have a database containing both imported and indexed files.
Note: While DEVONthink can handle large amounts of data, it is inadvisable to import or index uncurated data, like entire hard drives or your Home directory. You should be judicious in what you put into your databases.