Before we begin, let's first briefly examine the Linux source tree. At the time of our demo it contained 47,528 files which occupied 1.71 GB on disk. Most of these files were C code, yet there was also a fair amount of documentation and configuration files. Sando and FindInFiles both search all text files.
Searching the Linux Source Tree with FindInFiles
Searching the Linux Source Tree with Sando
Try It For Yourself: Online, in Eclipse, or in Visual Studio
- Instasearch plugin - Uses Lucene to index and search text files (including source code). Built on Lucene, returns results as a ranked list of files.
- Entrian Source Search - An inexpensive ($30) code search extension with fast recommendations developed by my friend Richie Hindle. Popular within the gaming community, built using Lucene.NET, returns results as a list of files.
- Sando Code Search - A free, open source extension that leverages srcML, Lucene.NET, and research on extracting phrases from identifiers. Built on Lucene.NET, returns results as a ranked list of program elements (e.g., methods and classes).
- Future Visual Studio Feature? - While full-text search is not part of Visual Studio itself yet, there is a feature request to include it which has already received 80+ votes. If you too want to see this feature in a future version of VS, vote it up!
- Github - Because GitHub uses ElasticSearch, built on Solr, built on Lucene, it provides a similar project-level search to the above tools. It does a much better job than many web searches because Solr uses the WordDelimiterFilter class, which is much more effective than standard splitters at splitting camel-cased identifiers. Provides search results at the file level.
- OpenGrok - Perhaps the first open source search tool for source code, OpenGrok has been around since 2004 and supports many languages. Built on Lucene as an Apache web service it provides file level results.