Making Windows 7 Search a little less dysfunctional

I was never a fan of Windows Desktop Search. I had stuck with Google Desktop Search for a long time, but gradually got sick of the CPU hogging and so gave Windows Search (on Vista) another try. It seemed to find emails in Outlook well enough, but as a tool for file-searching, it frankly sucked. It just wouldn’t find stuff I knew was there. So I was forced to go low-tech to, say, find all files with the word “wordpress blog” in them: either

  1. Use the “Find In Files” feature of Visual Studio
  2. Fire up a Cygwin bash shell and use the trusty old grep.

I was rather disappointed to find the same shortcoming in Windows 7 Search: that it would completely fail to find plaintext files that contained some string. How much simpler a request can you make?

Turns out Windows 7 can do what I am looking for, it just needs to be reconfigured in two significant ways:

  1. In the Start search box type in “Indexing Options” to open that control panel.
  2. Click the Advanced button.
  3. Make sure that the file extensions you hope to find are set up to “index file contents”, which isn’t the default behavior. So go to the “File Types” tab and find the extensions you’d like to find (in my case it was “php”). Highlight it and then click the “Index Properties and File Contents” radio button. If you can’t find the file type you’re looking for, you’ll have to add it at the bottom. Repeat for other file types.
  4. OK out of the “Advanced Options” dialog.
  5. Then, despite what the Windows 7 documentation says, simply adding a directory to a Library does not make it get indexed. So click the “Modify” button and manually add whatever directory you want indexed.
  6. You probably want to delete and rebuild the index at this point (in the Advanced Options) dialog, then go for a nice long walk as it could take hours to finish the indexing.

Do all this, and finally Windows 7 Search will at least work. Now it’s still not quite as fully-functioned as, say,Visual Studio Search, for the following reasons:

  1. I don’t get preview snippets of PHP (or Javascript, or CSS, etc.) files in the search results, although I do for HTML files. Huh? Both are plain text, and Windows 7 knows that!
  2. Non-alphanumeric characters get totally ignored in the search term. E.g., I’m a big fan of FirePHP, but good luck doing a search for all instances of, say, “fb(“. The parenthesis gets dropped.


1 comment

Leave a comment

Your email address will not be published. Required fields are marked *