gonzui: tutorial


Basically, using gonzui is easy. You don't need Apache, MySQL or other web middleware and you don't have to edit a configuration file just to try gonzui.

How to Build

To build gonzui, run the following commands. You need to prepare requirements beforehand.

% tar zxf gonzui-XXX.tar.gz  # XXX is the version number
% cd gonzui-XXX
% ./configure
% make

You don't have to install the gonzui files to your system directory (ex. /usr/local/*). Instead, you can try gonzui in the build directory.

Basic Usage

First, You need to import source codes into an index. For example, if you want to import the source codes of wget-1.9.1.tar.gz, run the following command.

% ./gonzui-import wget-1.9.1.tar.gz

or if your system has apt-get and it's configured correctly,

% ./gonzui-import --apt wget

Then, you can run gonzui-server that works as a web-based search engine.

% ./gonzui-server

Finally, you can access the search engine with your browser. The URL is http://localhost:46984/.

Import through version control systems

Currently, gonzui supports import from CVS and Subversion's repositories. For example, if you want to import source codes that can be obtained by the following command,

% cvs -d :pserver:anonymous@cvs.ruby-lang.org:/src co ruby

you can just run gonzui-import as follows.

% ./gonzui-import --cvs :pserver:anonymous@cvs.ruby-lang.org:/src ruby

In short, you can replace "cvs -d X co Y" with "gonzui-import --cvs X Y".

For Subversion, if you want to import source codes that can be obtained by the following command,

% svn co http://svn.edgewall.com/repos/trac/trunk trac

you can just run gonzui-import as follows.

./gonzui-import --svn http://svn.edgewall.com/repos/trac/trunk trac

In short, you can replace "svn co X Y" with "gonzui-import --svn X Y".

You can update the gonzui's index by gonzui-update command to reflect changes as described bellow.

Currently, gonzui doesn't support revisions and tags of CVS and Subversion.

Incremental Update

gonzui-update is a tool for doing incremental update of the existing indices. For example, if you build an index by importing /somewhere/foo by the following command:

% gonzui-import /somewhere/foo

and then, you want to update the existing index for reflecting recent changes (addition, deletion, and update of files) in /somewhere/foo, you can just run gonzui-update like:

% gonzui-update

Since the index includes the location of /somewhere/foo, you don't have to give any parameters to gonzui-update command. If the existing index contains two or more packages, all packages are supposed to be updated. If /somewhere/foo is disappeared, gonzui-update prints an warning like "source disappeared".

Other Usage

Command-line-based search tool is also available mainly for debug purposes. To find locations of ``main'' function, run gonzui-search as follows.

% ./gonzui-search main

You can inspect gonzui's index using gonzui-db command. To obtain the list of packages in the index, run gonzui-db as follows.

% ./gonzui-db --list

To remove wget-1.9.1, run gonzui-remove as follows.

% ./gonzui-remove wget-1.9.1

For further information on usage, try --help option of each command.

Gonzui Developers