I installed the Windows Search 4.0 update for Vista Home Premium today, and unfortunately it has failed to fix the most fundamental flaw in Vista’s search capabilities: false negatives in results. I’ll give an example of just how appallingly rubbish Vista’s search is.
Here’s the situation: I have a folder called C:\Program Files\1060-NKSEDK-3.3.1 containing a large number of files spread throughout various subfolders. I want to get a list of all the files, in that folder or its subfolders, containing the term “HTTPBridgeConfig”. In Windows XP or 2000, this was easy to do and reliable. Using Windows Explorer, you navigated to the directory you wanted to search within (in this case, C:\Program Files\1060-NKSEDK-3.3.1), pressed Ctrl+F, entered the phrase you wanted to search for, selected the “Search in subfolders” and “Search within files” check boxes, hit enter, and soon you’d have a list of all the files you were interested in.
In Vista, it’s apparently supposed to be possible to do the same thing, but actually it isn’t, because Vista is just… broken. In Vista, trying to find those files goes as follows.
As with XP and 2000, you navigate to the folder you’re interested in. Here, however, the experience diverges for the worse. You enter your search term in the search box at the top right of the window and press return. You might get some results, but they’re not the ones you’re interested in because you haven’t yet been presented with an opportunity to specify that you wish to search within files (yes, you actually have to perform a search before you get the option to specify what kind of search you want to perform – how dumb is that? Totally ass-backwards, that’s how dumb). At the bottom of the unwanted results, Vista prints a little message: “Didn’t find what you were searching for? Advanced Search”. Clicking on Advance Search expands an extremely poorly designed advanced search pane that, it eventually becomes apparent, relates to the search box in the top right corner that you used originally, but which (unlike the advanced search options panes XP and 2000) fails to provide any visual feedback to alert you to this fact. Sadly, in the advanced search pane, there is still no option to specify that you wish to search within files. However, there is an option to “Include non-indexed, hidden and system files (might be slow)”. Exasperated, you select this in the vain hope that perhaps file contents are “non-indexed” or something, and that therefore this will let you search within files, and you click the “Search” button. At this juncture in the hellish process, something vaguely – but not entirely – promising happens. Although this search (note: the second you’ve performed so far) still fails to identify the files you are interested in, it includes below its results a slightly modified (blink and you’d miss it) version of the pessimistic message that appeared below the previous search: “Didn’t find what you were searching for? Search in Files Contents. Advanced Search”. Aha! You may have had to jump through some preposterous hoops to reach it, but finally you have a chance to do what you wanted to do right at the beginning: request a search of files’ contents (NOT just files’ names). You click the link expectantly, hoping for a comprehensive list of all the files within the folder you selected, that contain the text you searched for. However, XP and 2000 would have given this to you, but… Vista won’t.
Here are the results of performing the above searches on my PC.
The results of the first and second searches in Vista, which just looks at filenames (i.e. not what is wanted):
C:\Program Files\1060-NKSEDK-3.3.1\modules\mod-fulcrum-backend\etc\HTTPBridgeConfig.xml C:\Program Files\1060-NKSEDK-3.3.1\modules\tutorial\etc\HTTPBridgeConfig.xml
The results of the third search in Vista, which ostensibly looks at file contents as well as filenames:
C:\Program Files\1060-NKSEDK-3.3.1\modules\mod-fulcrum-backend\etc\HTTPBridgeConfig.xml C:\Program Files\1060-NKSEDK-3.3.1\modules\tutorial\etc\HTTPBridgeConfig.xml C:\Program Files\1060-NKSEDK-3.3.1\log\netkernel0.log C:\Program Files\1060-NKSEDK-3.3.1\log\netkernel1.log
As you can see, this finds a couple more files. If I didn’t know better, I’d be forced to assume that Vista had indeed found all the files under C:\Program Files\1060-NKSEDK-3.3.1\ that contain the text I’m interested in: “HTTPBridgeConfig”. However, a double-check using grep via cygwin (configured to give the same sort of results as Windows XP or Windows 2000) reveals the truth.
The results of running grep -irl ‘HTTPBridgeConfig’ . in the same directory (i.e. the same results as W2K or XP would give):
C:\Program Files\1060-NKSEDK-3.3.1\log\netkernel0.log C:\Program Files\1060-NKSEDK-3.3.1\log\netkernel1.log C:\Program Files\1060-NKSEDK-3.3.1\modules\forum-web-1.1.6.jar C:\Program Files\1060-NKSEDK-3.3.1\modules\mod-fulcrum-backend\etc/HTTPBridgeConfig.xml C:\Program Files\1060-NKSEDK-3.3.1\modules\mod-fulcrum-backend\module.xml C:\Program Files\1060-NKSEDK-3.3.1\modules\mod-fulcrum-frontend\etc\DefaultHTTPBridgeConfig.xml C:\Program Files\1060-NKSEDK-3.3.1\modules\mod-fulcrum-frontend\module.xml C:\Program Files\1060-NKSEDK-3.3.1\modules\mod-fulcrum-servlet\module.xml C:\Program Files\1060-NKSEDK-3.3.1\modules\tpt-http-2.2.2.jar C:\Program Files\1060-NKSEDK-3.3.1\modules\tpt-servlet-2.2.2.jar C:\Program Files\1060-NKSEDK-3.3.1\modules\tutorial\etc\HTTPBridgeConfig.xml C:\Program Files\1060-NKSEDK-3.3.1\modules\tutorial\module.xml C:\Program Files\1060-NKSEDK-3.3.1\scratch\modules_ext_introspect_1_3_1\org\ten60\netkernel\introspect\module-summary.xml C:\Program Files\1060-NKSEDK-3.3.1\scratch\modules_mod_lucene_1_1_10\org\ten60\netkernel\ext_entrypoint\master\_1j6.cfs
So you see, there weren’t only four files containing “HTTPBridgeConfig”: there were actually fourteen. Vista’s search is totally untrustworthy, having missed 70% of the relevant files!
And that, dear readers, is how broken Vista’s search is.
yes yes yes and yes.
How is this not a bigger issue? Does anyone know of any good alternatives (other than downgrading to XP – cant believe Im even saying that – we have gone backwards).
Im trying google desktop but the search on that is useless. They are all trying to get 5 steps ahead of the user I just want to do a simple find in files – its not rocket science – get out of my way!.
so google desktop search sucks – know of any alternatives?
thanks n
I think the problem is that it only searches certain file types (eg .html or .doc) – but not, say, .php.
solution:
http://www.joshstauffer.com/2008/01/search-for-text-inside-of-php-files-with-vista/
Hi Nick,
Thanks for the link to Josh Stauffer’s post. That’s useful indeed, and I’ll try it out when I have a chance. I wish Microsoft had documented this better.
In the meantime, I’ve been using grep on Vista via cygwin, but it’s a cumbersome solution (firing up a shell and using the command line) compared to XP’s searching behaviour.
thanks
another tip – you can click ’search tools’ drop down (after you do a search it appears) – then ’search options’.
from there you can select ‘always search filenames and contents’.
Another tip – you need to reboot your machine for a lot of these changes to take effect (or it says restart the service but i cant find that).
Allowing windows to build new indexes in selected locations may also be required.
yes you’re right – its all buried and awkward. Like the snipper tool – handy but only if you know it exists!
Hi Nick,
Having now had a chance to try the suggestions in Josh Stauffer’s post, I see that it isn’t quite what I was after, and neither, I’m afraid, are the other suggestions you’ve made. They’re still helpful in a general sense, and I’m grateful for your having posted them, but I’m afraid they don’t quite address the problem I was blogging about.
The real problem, in my view, is that on-demand searching within files (as opposed to searches using the index) is both harder and less reliable on Vista than on XP (or, for that matter, Windows 2000).
The suggestions you’ve made don’t solve that (though they do solve other issues), so I’m still looking for answers. Why is Vista’s on-demand searching so shoddy, in terms of usability and functionality (did Microsoft fire the Vista search team before they’d finished their job? It sure seems like the underlying code is only half-finished…)? And, what can I, as a user, do to repair it (is there a patch that I’m missing?)?
Got it – after 6 months! *.cpp AND “UpdateExport” in the search box will find all instances of the string “UpdateExport” in my cpp files.
Its slow – even with indexing, and I dont know yet if it gets everything
Hi Ger,
Thanks for the suggestion. Unfortunately, it isn’t working for me. I searched for *.doc AND “cherie” on a drive that contained a Word document (.doc extension) with the word “cherie” in it. Vista didn’t find it, even when I enabled the “search non-indexed files” and “search within files” options.
spk
I’m having all these problems too; with or without indexing, I simply can’t search the content of text files such as .html and .css files. It returns many files that don’t contain the text and misses files that do. The files it returns don’t have the text in their filepath either, I just can’t see why they’re in the results.
What does Microsoft say about these problems? People say we shoudn’t “expect” features, but search “features” have appeared in advertising material for Windows Vista so it seems like we have every right to expect solutions that work – or our (lots of) money back.
Vexen, I entirely agree, and I’m not aware of any real comment from Microsoft on the issue.
If anyone from Microsoft reads this blog, please feel free to comment with a link to a response!
Try this… it worked for me…
I needed to look for some invoice numbers in files that were *.edi… I added the file type edi into what is search… and clicked on index properties and contents… and it worked.
Good luck http://www.watchingthenet.com/add-remove-file-types-to-windows-vista-search-index.html
Thanks Pat