Re: Introducing codesearch.debian.net, a regexp code search engine
Neil Williams <email@example.com> writes:
> It's pleasingly quick, which is always good. Might need to be able to
> exclude the debian/ directory from searches.
File regular expressions and a minus operator is already on the TODO
> First thing which occurs to me is that I'd prefer a summary page as the
> entry point for the search results - listing package, version and
> possibly a link to the PTS, possibly the number of hits for that
> package/package+version. First thing I've needed to do with every search
> result so far is find a relevant package within the results. The search
> results (and any summary page) should probably be sorted by package
> name too - I'm getting results from packages starting with m before
> package names starting with e.
Changing the entry point of the search is not going to happen — I quite
like the interface it currently has. However, adding a list of packages
which are present in the current page of search results would be
possible. Note that displaying the entire list of matching packages is
unfortunately not possible because it’d require searching through all
the files, which is — depending on the query — absolutely impossible
when still wanting to guarantee a timely response :-).
> Maybe extend the keywords to allow regexp matching on package names?
I have also considered this. Probably I will resort to making the
filename keyword (not yet implemented) use regular expressions and keep
the package keyword an exact match. Since the package is part of the
filename, complex things are possible while easy matches stay easy :-).
> Another important step would be a way of excluding matches
> within comments from the results.
I have considered this, but when you think about it, identifiers
(variable names, function names, …) and comments are really are there is
searchable in source code. Could you give me a few convincing points on
why it would be useful to exclude comments (that is, examples)?
> The filetype seems a little confused in places too. Searching for
> things in filetype:perl I get matches in debian/control and
Can you give me the exact query for which this happens, please?