Leopard’s Spotlight: You can also search for exact phrases

Posted by Pierre Igot in: Macintosh
June 12th, 2007 • 10:53 am

To me, this is probably one of the most important “new features” in Leopard:

From the Finder or the menu bar, Spotlight in Leopard lets you search for more specific sets of things. Use Boolean logic to narrow search results by entering “and,” “or,” or “not” into a search request. You can also search for exact phrases (using quotation marks), dates, ranges (using greater than [>] and less than [< ] symbols), absolute dates, and simple calculations.

It might not sound like much to you, but I cannot count the number of times that I have cursed at Spotlight for being unable to find a file that I knew contained a specific phrase, simply because all that Spotlight could do was search for individual keywords, regardless of their respective positions in the phrase.

Google has been doing this for years, and it was about time that Apple woke up and smelled the coffee. Language is more, much more, than a collection of individual words. It’s so obvious that it boggles the mind that Apple didn’t include this in Spotlight indexing from the beginning.

But then, when you look at how long it took the computing industry to actually come up with powerful search engines “for the rest of us,” it’s not really all that surprising…

Of course, I should also note that the above quote is taken from the page about… Leopard’s Finder. In other words, there isn’t a specific page about Spotlight in all the promotional materials about Leopard. To me, a properly working Spotlight is so much more important than, say, the ability to flip through my documents with Cover Flow.

We can only hope that, without making the headlines, Spotlight will still benefit from substantial improvements in Leopard. I see no mention of case-sensitive searches, which probably means that they won’t happen any time soon. But between searches for exact phrases and case-sensitive searches, I would definitely take exact phrases… if I really had to choose!

On the whole, my impression with Leopard is that there is definitely going to be a lot of “minor” improvements, more like fine-tuning what we already have than introducing a whole new paradigm.

That is somewhat disappointing for those of us who are still waiting for the next big breakthrough in personal computing, but in the mean time, I will definitely take an improved Mac OS X with more attention to detail and more attention paid to documents as opposed to applications. Maybe we’ll finally get to a true document-centric user interface through gradual improvements, rather than one big quantum leap.

Don’t know about that 3D Dock and the “elegant arc” (sic) of files jumping out of stacks, though… Last time I checked, my computer screen was still flat, and rectangular, not curvy and 3D. An “elegant arc” is not going to take me to where I want to go any faster…


10 Responses to “Leopard’s Spotlight: You can also search for exact phrases”

  1. Michael Tsai says:

    It’s so obvious that it boggles the mind that Apple didn’t include this in Spotlight indexing from the beginning.

    I think they made the right call. In Tiger the underlying Search Kit does support phrase searches, but updating large indexes is incredibly slow. I don’t think the technology was ready to be used for Spotlight.

  2. Pierre Igot says:

    Well, two problems here: A communication problem and a performance problem.

    The communication problem: As an end-user it is incredibly frustrating not to understand why this search engine is not capable of this while that search engine is perfectly capable of it. There is nothing obvious about the fact that a 2005 computer might not have been able to handle the processing requirements. So, if true, these kinds of decisions need to be explained to the user.

    The performance problem: Indexing is something that takes place in the background. Even if it’s going to take days, what do I care? As long as the process doesn’t affect the usability of the machine, I am sure a lot of users would be willing to give it days to complete its task, if that’s what’s needed. Is a 2007 computer really that much more powerful than a 2005 machine? A lot of the process is hard drive based, and there hasn’t been a quantum leap in hard drive performance in the past two years. So it’s hard to understand exactly how Apple “made the right call” here.

  3. MikeN says:

    I see no mention of case-sensitive searches, which probably means that they won’t happen any time soon.

    Case-sensitive searches are already possible in Tiger’s version of Spotlight. It’s just not implemented in such a way to make it easy or obvious because you have to know the syntax and use a Raw Query.
    For example:
    kMDItemFSName == “Untitled*” is a case sensitive search for files whose names start with “Untitled”
    whereas
    kMDItemFSName == “Untitled*”c is the same search but case-insensitive

  4. Pierre Igot says:

    MikeN: Right, but (unless I am mistaken) this does not work for contents, which is where it would be the most useful. I can do a case-sensitive search on various attributes, including file name, author, etc. But not on a document’s textual contents, which is where I need it the most.

  5. Arden says:

    That is somewhat disappointing for those of us who are still waiting for the next big breakthrough in personal computing, but in the mean time, I will definitely take an improved Mac OS X with more attention to detail and more attention paid to documents as opposed to applications. Maybe we’ll finally get to a true document-centric user interface through gradual improvements, rather than one big quantum leap.

    One thing that, er, leaped out at me while watching the keynote was during Steve’s demo of Spaces. He showed how you can drag windows from one space to another, which we had seen before. What came to my mind, however, was: is this a document-based task or an application-based task? If, say, Keynote is running in one space, is it running in all spaces? Does the app’s entire runtime exist in a space, or just each individual documents? Does the same app running in multiple spaces involve multiple instances of its runtime? Only time, or a good connection at WWDC, will tell, I imagine.

  6. Pierre Igot says:

    Arden: Yes, it’s an important question. Fortunately, Apple appears to have done the right thing. Applications don’t actually run in a specific space. It’s specific windows that live in specific spaces. In other words, you can have two windows open in Safari, one in Space 1 and one in Space 2. So it is document-centric rather than application-centric, which is good.

  7. Arden says:

    That’s what I figured, because I believe last year’s demo of Spaces showed one Safari window in one space and another in a different space. But Steve doesn’t make that clear… he makes it sound like we’re using Windows apps, where there’s a 1:1 relationship between an app’s runtime, its window and its document. At least they’re not ditching the well-established Mac method; that, I’m sure, would take much rewriting of the Cocoa API’s.

  8. Pierre Igot says:

    Of course, the drawback is that, if one web page in one space causes Safari to freeze or crash, the web pages in the other spaces will be frozen or lost in the other spaces as well. So in that respect it is still very much application-centric. Since Safari is one of those applications that do crash, well, we’ll have to learn to live with this.

    Spaces is really just some kind of window management tool. It has little to do with the way applications are designed. It just deals with those applications’ windows. (In that respect, it’s not really document-centric. It is window-centric. But since a document is usually either a window or a collection of windows, it’s not too much of a problem.)

  9. jacobolus says:

    Yes, you can do case sensitive searches in Tiger, as well as date ranges, number ranges, etc. etc., you just need to use mdfind, or alter the string in the .savedSearch plist directly, instead of typing it into the search bar.

  10. Pierre Igot says:

    jacobolus: Can you give more specific instructions? I tried editing my saved search in BBEdit, but all I get if I remove the ‘c’ after the closing quotation mark is 0 results.

Leave a Reply

Comments are closed.