Spotlight: Exact phrase search fails to find plural forms
Posted by Pierre Igot in: MacintoshMay 7th, 2010 • 4:44 pm
Although the first version of Spotlight in Mac OS X 10.4 (Tiger) didn’t include an option for searching for exact phrases of more than one word, thankfully Apple added that option in Mac OS X 10.5 (Leopard), using the standard notation with quotation marks that is supported by Google and many other search engines.
(In Tiger, searching for a sequence of words with quotation marks would restrict the search to file names, but not to the exact phrase formed by the words. Since Leopard, the ability to restrict the search to file names is provided via a button.)
As of Mac OS X 10.6 (Snow Leopard), however, Spotlight’s exact phrase search capabilities still suffer from what I feel is a highly undesirable limitation.
This morning, for example, I went looking for occurrences of the exact phrase “deep pressure technique” in my documents. Spotlight failed to find it anywhere in the main PDF document I was currently working on, even though I knew very well that it was there somewhere.
Why? Because the actual occurrence of the phrase in the PDF was “deep pressure techniques”, i.e. the plural form.
Now, I don’t know about you, but to me, the phrase “deep pressure techniques” does contain the exact phrase “deep pressure technique” and should therefore count as an occurrence of the phrase.
And there are plenty of search engines that agree with me, including, on my own computer, BBEdit’s search feature, the search feature of Apple’s own bare-bones text editor TextEdit, Pages ’09’s search feature, the text search feature in Mail for searching for phrases inside the body of a message, but not the message search feature in Mail’s toolbar, which is based on Spotlight, and not the search feature in Safari (which might be based on Spotlight too, since every loaded web page is automatically indexed by Spotlight).
It’s the inconsistency that is maddening.
Unfortunately, Google appears to agree with Apple. I can find, for example, the exact phrase “deep pressure techniques” on the Deep Touch Massage web site with Google.
But if I do a search for “deep pressure technique” restricted to that very same site, the search returns zero results.
I am afraid I don’t agree either with Google or with Apple. At least, unlike Spotlight, Google’s search engine is clever enough to also return results that include punctuation signs such as dashes, apostrophes or quotation marks somewhere inside the phrase (here’s an occurrence with quotation marks and one with a dash). But it fails to recognize “deep pressure techniques” as a legitimate occurrence of the phrase “deep pressure technique”.
Yet I believe that this additional flexibility provided by Google proves my point, which is that slight variations of the phrase “deep pressure technique”, including occurrences of these three words in that very order but interspersed with quotation marks or apostrophes (or other punctuation signs) or appended with a final “s” should also be deemed valid matches and returned in the list of results.
It’s basically a common sense issue. If I am looking for exact occurrences of a phrase, surely it does not matter to me whether the phrase is in the singular form or the plural form, especially if the plural is exactly the same as the singular, but with a final “s” appended to it.
Needless to say, things get more complicated in cases where the plural is formed by doing something other than just appending a final “s.” Maybe one day our search engines will be smart enough to return “top shelves” as a valid occurrence of the exact phrase “top shelf”. (And irregular plurals are much more common in my other language, French, which also requires the agreement of adjectives, so things get even more complicated…) But until then, I could live with the “smartness” of my search engines being limited to regular plurals formed with a simple final “s.”
Is that really too much to ask?
Yes, I suppose that there are contexts where the user might not want to get the plural form returned as an occurrence. But that’s what the “Whole words” option is for. Speaking of which, the search feature in Apple’s Pages ’09 really has it all wrong. While, unlike Spotlight, it does recognize “deep pressure techniques” as a valid occurrence of the phrase “deep pressure technique”, if you add the “Whole words” option in the “Find/Replace” dialog, it does not find anything. Neither “deep pressure technique” nor “deep pressure techniques”. As far as I can tell, the “Whole words” option only works when what you are search for is… a single word. Maybe they should rename it “Whole word” instead.
But what they should really do, of course, is design the “Whole words” option so that, when the search string consists of more than one word, it finds occurrences of the exact phrase without any letters before or after it, only punctuation marks. This way, a search for the phrase “deep pressure technique” with “Whole words” OFF would return occurrences of both “deep pressure technique” and “deep pressure techniques” and a search for the phrase “deep pressure technique” with “Whole words” ON would only return occurrences of “deep pressure technique” without the final “s.”
That’s the way the “Entire word” option works in BBEdit (which should actually be called “”), and that, I believe, is the way it should work everywhere. Of course, that would require that both Apple and Google add a “Whole words” option to their search engines. But surely if the option exists in word processors and text editors (even if it does not work properly in some of them), it should also be available in other search features/engines.