Best solution on Windows to search 100k+ source code files?

Posted by: drakino

Best solution on Windows to search 100k+ source code files? - 20/04/2006 04:48

So with my new job, I'm dealing with a lot of source code. And from time to time, have a need to be able to search it. Problem is, the indexing service inside Windows seems to be non functional, and in my attempts, Google Desktop with some plugin also fell short. My basic needs are:

1. Search files quickly. Near instantly would be good but not mandatory.

2. Allow me to specify file extensions to index. This is where Google Desktop fell short. It simply ignored even basic .cpp files without a plugin. And with a plugin, I couldn't modify the extension list after it was installed. So, if I came across a new extension I needed to add to the index, I had to reinstall the plugin, and use a third party tool to force the Google side to reindex.

3. Be flexible in the searches. Sometimes I might want to search the entire disk, but other times just a certain subfolder. Never found how to do with with Google Desktop.

Any suggestions?
Posted by: elperepat

Re: Best solution on Windows to search 100k+ source code files? - 20/04/2006 05:00

I dumped the original windows search when I found about locate for windows . It's a very good alternative to the bad search of windows. It should be a good starting point. And it's free!

If you decide to try, be sure to get the latest "daily" release. It is very stable and include a lot of fix. If I remember correctly, you need to install the latest official release (2.99.5.10100) and then unzip the daily release (2.99.6.3190) in the installation folder.

You can configure which disk to scan, when to scan and such. Like locate for *nix, the search is based on a database, so recent changes to the file system are not immediatly searchable, but result (at least for file search) is almost instantaneous. You can update manually if you need to.
Posted by: andy

Re: Best solution on Windows to search 100k+ source code files? - 20/04/2006 05:41

It looks like locate only searches the file names. I think Tom needs to search within the files as well.

The best tool I am aware of for this on Windows is Agent Ransack. It doesn't build an index, so searches aren't instantaneous, but it is very flexible.
Posted by: elperepat

Re: Best solution on Windows to search 100k+ source code files? - 20/04/2006 06:23

You can search within files by using a field the advanced tab (3rd): "Search files containing". I don't know how fast it'lll be for that purpose though, as it doesn't index the content but only the "directory structure".
Posted by: Ezekiel

Re: Best solution on Windows to search 100k+ source code files? - 20/04/2006 16:31

Copernic Desktop Search will do what you want. You'll can tell it specifically which directories to index, subset a particular directory to search, add .c or .h (or any file suffix) to its list of file types that should be indexed, set it to look only in the file title or through the whole file. And, it's free. I've used it over a year now and cannot imagine life without it.

Link.

-Zeke
Posted by: drakino

Re: Best solution on Windows to search 100k+ source code files? - 21/04/2006 15:34

Copernic looks like exactly what I need. It hasn't even indexed much yet, and already my quick tests on it are returning exactly what I need. The ability to add files to the index without having to write a plugin is great, and also the control over the index and search results.

Google needs to take a page from their book. Google Desktop looks like rubbish next to what this thing is already doing. Oh, and Copernic scored bonus points with me by already including .cpp and other common programing files by default. All I really had to add was a small selection of extensions used only by the project.

Depending on how my test goes with it this week, I may send it out to the rest of the team as something that might be handy.
Posted by: Ezekiel

Re: Best solution on Windows to search 100k+ source code files? - 21/04/2006 16:19

I'm glad it suits your purpose. It's reprehensible how bad Windows search features are. I don't use Copernic much for text files, but I find it indespensable for managing information in the bottomless pit of my .pst file and my enormous stack of .pdf files (catalogs and the like).

-Zeke
Posted by: FireFox31

Re: Best solution on Windows to search 100k+ source code files? - 23/04/2006 18:04

How can Copernic help with PDF files? Filename only? Or can it dig into the meta info? Or can PDF really be told to keep a hidden copy of the complete text of the document which search engines and desktop search can use?

I've been considering a digital library for work, and this may really help.
Posted by: drakino

Re: Best solution on Windows to search 100k+ source code files? - 23/04/2006 21:00

In their FAQ, PDF is listed in the section of files it can fully index. Google Desktop and Spotlight also fully scan PDF files.
Posted by: msaeger

Re: Best solution on Windows to search 100k+ source code files? - 23/04/2006 22:14

Will google desktop let you only index folders you specify ?