• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Spotlight word-based search
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Spotlight word-based search


  • Subject: Re: Spotlight word-based search
  • From: Pierre Bernard <email@hidden>
  • Date: Sun, 21 May 2006 23:04:02 +0200

Things are not that easy. There are two syntaxes.

In the syntax used by NSMetaDataQuery, "like" is a valid operator: http://developer.apple.com/documentation/Cocoa/Conceptual/Predicates/ Articles/pSpotlightComparison.html
Sadly this format is hardly documented. It's documented by anecdotical differences to the NSPredicate syntax.


Pierre


On May 21, 2006, at 5:26 PM, Matt Neuburg wrote:

On Fri, 12 May 2006 16:31:44 +0200, Pierre Bernard <email@hidden> said:
Hi!

Could anybody venture into an explanation as to why the following
Spotlight query string :
(kMDItemDisplayName like[wc] 'Desktop')
does not match 'Desktop Folder'?

That would be because "like" is not a valid Spotlight query string comparison operator. Correct syntax is documented here:

<http://developer.apple.com/documentation/Carbon/Conceptual/ SpotlightQuery/C
oncepts/QueryFormat.html>


m.

--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>




_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Re: Spotlight word-based search (From: Matt Neuburg <email@hidden>)

  • Prev by Date: Re: Please, White Noise app
  • Next by Date: [Moderator] EOT (Re: Please, White Noise app)
  • Previous by thread: Re: Spotlight word-based search
  • Next by thread: Re: Spotlight word-based search
  • Index(es):
    • Date
    • Thread