CS2 - a personal source code search engine

As I blogged some time ago I have been developing a source code search engine called CS2. I completed it lately and, although it's not as feature-rich as others - say, Koders Pro Edition - it works pretty fine and suites the needs of whomever needs to search through code stored on its machine. Actually, it's neither as heavy as Koders Pro as well, and plus it's free and open source.

It works as an ASP.NET 2.0 website and lets you request indexing folders and singular files, as well as search through them with a simple syntax. By default searches are performed in full-text fashion, but you can restrict queries on particular fields. The syntax is documented in the website. It's multithreaded so indexing and searches can occur at the same time.

It can be customized using the Properties.config file in the Configuration directory, by setting the folder where the files of the index are stored as well as the update interval. It's capable of automatically removing from the index files which no longer exist on the file system as well as update those which have been edited.

At the moment it can parse and index only C# source code but it's written upon Windsor inversion of control container and can be easily extended just by adding a new parser. If anyone's interested I will post about the complete process of adding a new parser.

To get started just download the zipped website from the project homepage and run it. Then type the path of a folder containing C# source code files on your machine in the corresponding input field and wait some time for the indexing process to complete (you won't see the progress since it occurs on another thread so that you can perform searches concurrently with indexing). Its duration depends upon the number of files to be parsed and indexed. Once indexing is complete updating the page shows the number of documents the index contains. Click on the link on the upper-right edge of the page to show the search syntax.

kick it on DotNetKicks.com

Published 13 September 2007 08:16 PM by simoneb
Filed under: , ,


# DotNetKicks.com said on 13 September, 2007 11:41 AM

You've been kicked (a good thing) - Trackback from DotNetKicks.com

# Tiernans Comms Closet said on 13 September, 2007 12:20 PM

I have been extremely busy over the last few days, so that's why there is a serious lack of posts here.

# Depechie said on 14 September, 2007 07:39 AM
Great tool !! I'm going to test it !
# Amit said on 17 September, 2007 05:30 AM
Great tool!!! Can you please post the details about adding a new parser?
# simoneb said on 17 September, 2007 05:39 AM

Sure Amit, when I have some time I will!

# Atena said on 21 September, 2007 02:00 PM

Thanks alot!

# David Cumps said on 22 September, 2007 11:53 AM

Sexy! Going to try it out on my work :)

# simoneb said on 22 September, 2007 11:58 AM

Thanks David. Although the core features are already there, it's still mostly a prototype and can be improved a lot. I'd be glad if you could report any issues you may encounter.

# Stuff for Geeks said on 30 April, 2009 04:50 PM

Team Foundation Server Search in Code (VB.net)

# membership site said on 10 October, 2014 10:48 PM

CS2 - a personal source code search engine - SimoneB's Blog

This site



This Blog




  • MaximumASP