What does Spotlight consider to be a ‘Document’

searchspotlight

I have noticed that the Finder's Recent Smart Search Folder doesn't show several type of 'app document' file.

The same is true if I create a new Smart Folder with the criterion set to Kind = Document.
(You can sort through the results by Kind in a List View)

For instance: Affinity Suite documents, such as .afpub, and .afdesign are not included.
Omnigraffle and OmniOutliner files are included.
Files from other apps, such as Finale (.musx) and Dorico (.dorico) are not included.

If I change the search criteria to Kind = Other: Affinity, then I get the Affinity documents, so it's not like Spotlight hasn't indexed them.

Does anyone know on what basis Spotlight considers a file to be a document?

These 'missing files' are the native document format for these apps, so they are listed in the apps' Info.plist, under CFBundleDocumentTypes.

Best Answer

Spotlight will only classify a file format as a 'Document' if there is a Spotlight importer for that file type.

Third-party applications with 'non-standard' file types (e.g. not text, graphics) will need to define an importer for their formats.

This way, the document metadata and possible also contents can be added to the Spotlight index.