The Finder's sidebar search for "Recents" (in High Sierra) is a raw query, which can be found here:
/System/Library/CoreServices/Finder.app/Contents/Resources/MyLibraries/myDocuments.cannedSearch/Resources/search.savedSearch
.
The query string goes like this:
(kMDItemLastUsedDate = "*") && ((kMDItemContentTypeTree = public.content) || (kMDItemContentTypeTree = "com.microsoft.*"cdw) || (kMDItemContentTypeTree = public.archive))
This also looks for Microsoft stuff. The relevant part of the query is:
kMDItemContentTypeTree = "com.microsoft.*"cdw
What does the "cdw" part of this query accomplish? And what does it stand for?
I found another mention here for mdfind
usage:
https://gist.github.com/cwalston/7425465
! -interpret Force the provided query string to be interpreted as if the user
! had typed the string into the Spotlight menu.
! For example, the string "search" would produce the following
! query string:
! (* = search* cdw || kMDItemTextContent = search* cdw)
Best Answer
cdw is an abbreviation for these search queries with this functions:
c: Case insensitive
d: Diacritical insensitive
w: Word-based, and detects transitions from lower- to uppercase
Source:
Mac OS X Snow Leopard for Power Users: Advanced Capabilities and Techniques by Scott Granneman