tags:

views:

18

answers:

1

I am working on a C++ project which has a huge code base and multiple components. I want to create a rich code browser for it which will give a visual studio like experience. I am thinking of an Adobe AIR app with Lucene or Swish-e as the backend text indexer. I have never used either of the two. If you have used one or both of them, can you please tell me if Lucene/Swish-e is suitable for this kind of application? Can I configure it to make it language aware for C++, Flex, etc? Are there existing open source solutions for this problem I can take a look at?

A: 

Lucene in Action 2nd ed. contains a chapter on a product called krugle which uses Lucene for searching source code. I have never used swish-e, so I can't compare them, but that book talks about the benefits and detriments of using Lucene. You can also try their search here, for what that's worth.

To summarize their chapter:

  • Pros: Lucene scales very big, and is very fast. Essentially, once you have the index, it's all gravy.
  • Cons: The standard analyzers throw out words like "if" and "for" and punctuation marks like "{" which are important in source code searching. Also code doesn't tokenize easily (e.g. "GetDatabaseInstance" should tokenize to three words, not one). So they had to write a lot of their own analyzers.
Xodarap
Thanks. Will look into it.
Rajorshi