Saturday, May 10, 2008

Commits search

codenotifier search

Codenotifier now has seach function. It searches over projects and commits, so if you enter 'rails' you'll get 'rails' project, 'railstree' (because simple queries are automaticaly suffixed with *), and all the commits in different projects that have 'rails' in (start of) their commit message, user name or project name. Some more examples:
  • You can see how given technology is spread or just mentioned over projects, e.g. flickr, twitter, facebook.
  • In opensource projects people are often rather creative in commit messages, so you can test it with queries like "moon" or "yeah"
  • You can limit your search results to specific project, e.g. "hadoop grid*" Here we see that project name is also searched in commits search.
  • When someone's patch is included in opensourc project it's usually commited by someone else, but author is often mentioned in commit message. For such cases we can see his traces in different projects by query like this: vestbø
  • Individual fields can be queried too, e.g. we can have a list of sri's commits: author:"sri". Available fields are author, project_name and description. No field specification means everywhere. And everything can be combined: (google !project_name:a*) OR author:dant*.
  • Plain old search for some specific problem, like cache store_headers. Or you can limit it to single project: cache store_headers "httpd". Or to several projects: cache (mediawiki OR webkit). Or exclude some project: scal* -scala
In commits search project name, author and message all are searched over. And Lucene/Google search syntax works, like 'x AND y', 'x OR y', 'x y' (same as 'x AND y'), "x y" (double qoutes makes query be interpreted as complete phrase), 'x y -z', '(x OR y) -z' and so on.

For more detailed query help please see Lucene query help page. It mostly applies but have some differences, e.g. in codenotifier words are joined with AND by default; '!' works as NOT; may be something else, please comment if you find something.

Results are given in (reverse) chronological order.

Asterisk can be used in any place as a mask but can make search sometimes slow. It's added automatically to the end of query when Codenotifier thinks it's simple; and it leaves it as is if it looks advanced, i.e. contains asterisk, doublequote, AND or OR.

The search is powered by excellent Ferret and acts_as_ferret libraries, big thanks to their authors!

1 comment:

Anonymous said...
This comment has been removed by a blog administrator.