Spotlight, cocoa and carbon
For reasons I do not understand,
mdfind 'kMDItemTextContent = "*term*"cd'
is not sufficient to find every occurrence of the search term term. William Cannings on the spotlight-dev list helpfully pointed out that one needs an additional search term:
(* = "term*"wcd || kMDItemTextContent = "term*"cd)
This works its magic in mdfind. But there does not seem to be a way to encode the first clause as an NSPredicate…
(anykey like[wcd] 'term*') or (kMDItemTextContent like[cd] 'term*')
doesn’t do anything more than its second clause.
The folks at CocoaDev suggest using Carbon… which is a rewrite
!
August 4th, 2006 at 7:52 pm
[…] ansemond.com Logos « Spotlight, cocoa and carbon […]