How to find an exact phrase

Can someone please tell me how I can find an exact phrase using Spotlight? Let's say I want to find all the documents that cantian the phrase "Now is the Time" and only those documents. Normally I would put them in quotation marks, but this does not seem to work with Spotlight. Without the quotation marks, I get hundreds of possible files that have the words "now" "is" "the" and "time" located somewhere in them. This makes finding just the ones and only the ones that contain this exact phase very hard to find.

Surely there must be a way....
Anyone???

Tom

MacBook, Mac OS X (10.4.10), 2GHz MacBook, 1GB RAM, 120GB Hard Drive

Posted on Sep 21, 2007 10:06 AM

Reply
7 replies

Sep 21, 2007 1:34 PM in response to Francine Schwieder

I think I heard somewhere that the first 2000 unique terms from each document are indexed..

As far as quotes go.. I've only seen them determine whether to search the metadata or content index. Entering more than one term will always narrow the search to items containing all terms.

Exact phrase search should work in the next version (Leopard) of Spotlight...

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.</div>

http://www.apple.com/macosx/leopard/features/finder.html

Sep 21, 2007 11:27 AM in response to Tom Bailey

There isn't a way to find an exact phrase. You can find documents that contain any of the words, or, if you surround the search term in quotes, you can find documents that contain all the words. The Spotlight index only lists unique words in a document (and there is an upper limit on how many it will list, although I don't remember the number at the moment), it does not contain info on the arrangement of the words. To find an exact phrase you would have to do a brute force search using something like the Terminal's grep command, which would go through each file in a folder looking for the string. This can be time consuming.
Francine

User uploaded file
Francine
Schwieder

Sep 22, 2007 3:52 PM in response to Tom Bailey

As I mentioned, you can do a brute force search using grep, or try the free search tool EasyFind:

http://www.devon-technologies.com/products/freeware/

You would want to limit the search to a specific folder or sub-set of folders. Thus I just used EasyFind to search my Sites folder, which contains 602 folders and sub-folders, with almost 8,000 files, for any files containing the phrase "text-align: left;"--it returned a list of 94 files with that exact phrase, and took about 2 minutes to finish. Be sure to click the little light switch icon to tell it which sorts of files to search.
Francine

User uploaded file
Francine
Schwieder

Oct 9, 2007 6:08 AM in response to Daniel Marr

Google Desktop will search for exact phrases. Find it here:

http://desktop.google.com/mac/index.html

It's not a bad tool, and if you really need phrase searching it's a godsend; but the early versions I played with several months ago were kind of resource intensive and didn't seem always to get along with other apps, so I took it off my laptop. Perhaps they've worked out some of the kinks in the meantime.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to find an exact phrase

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.