A Quick Guide to Spotlight (Mac)

Mac Users may be interested in some of the capabilities of Spotlight indexing that’s possible with Dorico now.

First of all, in the standard Spotlight dialog, you can type things like this:
Screenshot

Bear in mind that the Composer field is the same as that used by Music (formerly iTunes), and other apps, such as Finale.

Other keywords include copyright, title, editor, lyricist (though again, these will bring up lots of non-Dorico files). Also, you may get results without any keywords (as generic ‘content’) for various text elements. You can narrow the search with kind: dorico.

In the Finder, you can do Command F and create a more refined search. Here, we’re including only Dorico files:

Screenshot 3

The first drop-down list (e.g. “Kind”, “Composer” gives a few common or recent keywords, and there’s an “Other” menu item that takes you to the complete list of keywords in Spotlight’s repertoire.
Screenshot

.
If you want to get hardcore, you can use mdls filename on the command line, which will give you a huge amount of data:

_kMDItemDisplayNameWithExtensions      = "L'umilta coronata.dorico"
kMDItemComposer                        = "ANTONIO LOTTI (1667 - 1740)"
kMDItemContentCreationDate             = 2020-04-11 18:48:08 +0000
kMDItemContentCreationDate_Ranking     = 2020-04-11 00:00:00 +0000
kMDItemContentModificationDate         = 2022-03-04 11:11:05 +0000
kMDItemContentModificationDate_Ranking = 2022-03-04 00:00:00 +0000
kMDItemContentType                     = "com.steinberg.dorico.project"
kMDItemContentTypeTree                 = (
    "com.steinberg.dorico.project",
    "public.data",
    "public.item",
    "public.content"
)
kMDItemCopyright                       = "© 2022 Ben Byram-Wigfield"
kMDItemDateAdded                       = 2020-04-11 18:48:12 +0000
kMDItemDateAdded_Ranking               = 2020-04-11 00:00:00 +0000
kMDItemDisplayName                     = "L'umilta coronata.dorico"
kMDItemDocumentIdentifier              = 0
kMDItemEditors                         = (
    Editor
)
kMDItemFSContentChangeDate             = 2022-03-04 11:11:05 +0000
kMDItemFSCreationDate                  = 2020-04-11 18:48:08 +0000
kMDItemFSCreatorCode                   = ""
kMDItemFSFinderFlags                   = 0
kMDItemFSHasCustomIcon                 = (null)
kMDItemFSInvisible                     = 0
kMDItemFSIsExtensionHidden             = 0
kMDItemFSIsStationery                  = (null)
kMDItemFSLabel                         = 0
kMDItemFSName                          = "L'umilta coronata.dorico"
kMDItemFSNodeCount                     = (null)
kMDItemFSOwnerGroupID                  = 20
kMDItemFSOwnerUserID                   = 501
kMDItemFSSize                          = 1953290
kMDItemFSTypeCode                      = ""
kMDItemInterestingDate_Ranking         = 2022-03-04 00:00:00 +0000
kMDItemKind                            = "Dorico document"
kMDItemLastUsedDate                    = 2022-03-04 10:58:42 +0000
kMDItemLastUsedDate_Ranking            = 2022-03-04 00:00:00 +0000
kMDItemLogicalSize                     = 1953290
kMDItemLyricist                        = "Lyricist"
kMDItemPhysicalSize                    = 2101248
kMDItemTitle                           = "L'umilta coronata"
kMDItemUseCount                        = 16
kMDItemUsedDates                       = (
    "2020-04-11 23:00:00 +0000",
    "2020-10-03 23:00:00 +0000",
    "2021-03-27 00:00:00 +0000",
    "2022-03-01 00:00:00 +0000",
    "2022-03-04 00:00:00 +0000"
)

You can then type things like this:

mdls "L'umilta coronata.dorico" | grep Title

and get:
kMDItemTitle = "L'umiltà coronata in Ester"

There’s also a command, mdfind to query the whole index.

One caveat: I’m only getting Spotlight data on documents that I’ve opened since the update. (NB: re-saving not required.) Re-indexing the Spotlight database doesn’t seem to have changed this. I’m not sure whether this is expected. Spotlight can be a little funky from time to time.

However, you can ‘force’ Spotlight to index files with:

mdimport -i /path/to/folder/

That seems to be working nicely now.

10 Likes