Sunday, July 26, 2009

Desktop search vs good old grep

Been installing various desktop search tools like the Google Desktop, Copernic (once free), Microsoft Search etc and after a few weeks / months of usage, eventually felt happier to uninstall them. One of the primary reason I need a desktop search was I needed a tool to quickly search for mails. I would seldom search for files on my machine.

But one assumption that we need to keep in mind is that, these search engines are not exact. That is, the engines fetch you results, but they may not be comprehensive. The web crawling spiders that scour the web for data and index them, it is possible thet the server's index may be out of sync with respect to the actual web site as new data would have been posted after the spider index the content. In the Internet, sure, if you have a few sites missed out, it does not matter much. But desktop search apps seem to work in very similar lines. If at some time, for want of speed or to free up available memory, you stop indexing your mails or documents, chances are, these mails might not be indexed at all.

So, there were various instances where I was searching for that particular mail and it did not show up. Be aware that such search engines are not comprehensive and it is a good idea to resort to the good old linear search just it case. Though they may take time, they give you comprehensive results.

The same would apply when searching for keywords in code that you plan to manipulate. You would want to get all of the matching sources and not want to miss out even one.