[Israel.pm] Remove Source Code Indexer and Search

Offer Kaye offer.kaye at gmail.com
Thu Nov 17 12:43:57 PST 2005


On 11/17/05, David Baird wrote:
> 1. Create tag files automatically from a server which they can work
> with in their favorite editor.

Not sure about this. I'd use ctags[1] for anything tag related, but
I'm not aware of any automatic services for handling the tag creation.
Perhaps you can hook into your revision control system so that ctags
is run at every check-in?

[1] http://ctags.sourceforge.net/

> 2. Engineers also want to search in the commented text of source
> files, so I am looking for an indexing and search tool, web based,
> perhaps also a web service.

lxr[2] should work here for the indexing part: "A general purpose
source code indexer and cross-referencer that provides web-based
browsing of source code...". As a bonus, it should easily handle your
10k files of code (it handles the linux kernel :)), and it supports
ctags.

[2] http://sourceforge.net/projects/lxr

For the searching part, lxr has its own built-in search utilities. If
you're not happy with that, you can find many FOSS tools listed
here[3]:
[3] http://www.searchtools.com/tools/tools-opensource.html

I've heard in the past of ht://dig and SWISH-e, they seem to be 2 of
the more popular ones used. If you prefer something more professional
and/or related to searching code, you might want to checkout
Koders[4], they have an "Enterprise Edition" available[5].

[4] http://www.koders.com/
[5] http://www.koders.com/info.aspx?page=EnterpriseInfo

Of course, if you're going the paying route, maybe the Kings of
Searching[6] can help you :)

[6] http://www.google.com/enterprise/

> 3. Create a Perl based service callable from a command line client so
> search through the engineer's sources.

Obviously, CPAN has more search related modules then you can shake a
stick at: Plucene[7], MMM::Text-Search[8], Search::Indexer[9],
Search::FreeText[10], CGI::Search[11] and many others. Alas, I
couldn't find one which was specifically for searching source code,
but perhaps this will do.

Or maybe you could run 'grep', and convert the results to nice HTML :)

[7] http://search.cpan.org/dist/Plucene/
[8] http://search.cpan.org/dist/MMM-Text-Search-0.07/
[9] http://search.cpan.org/dist/Search-Indexer/
[10] http://search.cpan.org/dist/Search-FreeText/
[11] http://search.cpan.org/dist/CGI-Search/


>
> Has anyone done any of the above? Can anyone give me some pointers and
> useful information?
>

I've never done any of the above, nor used any of the tools I listed.
I hope the pointers prove useful anyway :)

If any of this task turns out to be Perl related and you can talk
about it (not company confidential), a lecture would be great :)

Cheers,
--
Offer Kaye




More information about the Perl mailing list