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 :-( !

One Response to “Spotlight, cocoa and carbon”

  1. ansemond.com » Blog Archive » My way or the highway! Says:

    […] ansemond.com Logos « Spotlight, cocoa and carbon […]

Leave a Reply