Undocumented Boolean NOT, OR, AND syntaxes for Mac OS X Tiger’s Spotlight search

There is Boolean search in Spotlight. Ipse dixit has a couple of articles that discuss undocumented Boolean searches in Apple’s Mac OS X Tiger’s Spotlight. We’ve condensed them down and tested them on Mac OS X 10.4.1, Build 8B15. The following works:

NOT=! – Searching for apple!mac also tells Spotlight to find everything with “apple” but NOT “mac”
OR=| – Searching for apple|mac tells Spotlight to find everything with “apple” OR “mac”
AND=space – Searching for apple mac tells Spotlight to find everything with “apple” AND “mac”

Full articles with discussions here and here.

MacDailyNews Note: If you find other undocumented Spotlight features, please add ’em below. Happy hunting!

16 Comments

  1. • NOT=! – Searching for apple!mac also tells Spotlight to find everything with “apple” but NOT “mac”

    phew …
    filibuster!bondage …
    NOW I can search political issues with my kids.

  2. • MONOPOLY=! – Searching for on MSN!Searching on this site only adds to the power of the devil.
    • MACHATER=| – Searching for Google|all of their products come out later for MacOS than for windows

  3. btw: for these to work, you must NOT put in a space ” ” between the regular AND expression and the other two

    so if you’re looking for the script for The Empire Strikes Back, you’d put in:
    Luke Leia(-Greedo)(-Ewoks)(-Grevious)

    because
    Luke Leia (-Greedo) (-Ewoks) (-Grevious)
    does NOT return anything.

    so the actual syntax is
    baz bar(-foo)
    = baz AND Bar, but NOT foo
    baz foo|bar
    = baz AND foo OR bar
    foo bar
    = foo AND bar

  4. “foo is a faux function name and bar is its argument”

    Agreed, but Dank is also correct. The original usage of the word is the acronym popularised by the U.S. Marine Corps:

    FUBAR = Fucked Up Beyond All Repair

    Which is closely related to another Marine acronym:

    SNAFU = Situation Normal – All Fucked Up

    Note that the Marines’ difficult mission (storming heavily defended coastlines) is preternaturally subject to Murphy’s Law (I’ve heard claims that the original Murphy was a Marine), and as such they expect things to go wrong. It is for this reason that Marines are typically so highly disciplined, and why the most prized quality in a Marine officer is the ability to innovate under extreme pressure (courage and discipline are givens). As a former Army man, I used to kid my many jarhead friends, but I have the deepest respect for the Corps and its members, God bless ’em.

  5. look, marines used to be my customers…all right? so there’s nothing but love the boys i was looking over, protecting them from afar… from the black sky…

    but come on… this is a NERD SITE, not fscking R. Lee Ermy time.

    http://jamesthornton.com/jargon/jargon.html#metasyntactic variable
    http://jamesthornton.com/jargon/jargon.html#foo
    http://jamesthornton.com/jargon/jargon.html#bar
    http://jamesthornton.com/jargon/jargon.html#baz

    ps: i didn’t even look up the last 3 – cause i know that they are just there.

    and DANK is not one of the metasyntactic variables… sorry.

  6. Also check out “Amberyl’s Mush Manual” on line. Following a lot of maqinframe coding tradition, the manual (for multi-player real time text RPGs) has used the “foo bar” terminology in code examples for more than a decade.

  7. What’s with all the nonsense syntax for boolean expressions in searches? I mean how hard is it Apple to simple use standard, universal boolean expressions for boolean searches? You’d think this was some arcane shit put together by a bunch of geeks for their own personal use.

    Suggestion Apple: If someone wants to find “lunch” but not “lunch money” just allow a search like: “lunch NOT money”.

    Geez!

    ” width=”19″ height=”19″ alt=”cool mad” style=”border:0;” />

  8. ZEKE!

    Another MUSHer? Coolness ” width=”19″ height=”19″ alt=”smile” style=”border:0;” />

    I still use Linux to run my MUSHes though; they’re more suited to the headless box. Recent TM3.x have run fine under OSX though; I simply prefer to shove the dumb brute work off on a machine that I’m seldom interactive with. IIRC, early OSX shipped with a somewhat wonky GBDM, which may have made me leery…

    This reminds me of something that I’ve thought of during past Keynote addresses… various sites do semi-realtime updates and possibly an IRC channel. Seems to me that a special purpose MUSH would be ideally suited to this… and all OSX users have at least a basic telnet app (hell, I use telnet in Terminal.app for all of my MU* needs. Then again, I’m perhaps a bit of a masochist). The channels system and/or the Auditorium flag could be used to great advantage, methinks… with a pretty damned low bandwidth footprint.

    If you or anyone else are interested in pursuing this idea further, email me at mdn@disorganized.org – if there’s enough interest I’ll set up a MUSH for further discussion.

    – ~ – Dual 500Mhz G4 (Panther), PII 400 MHz (Slackware) – ~ –

Reader Feedback

This site uses Akismet to reduce spam. Learn how your comment data is processed.