Manual of Namazu Version 1.3.0.11

Last Modified: 1998-08-31


NOTICE:

This file is a manual describing how to use Namazu. If you would like to know what is Namazu, see intro.html. Namazu is a free software obeying GPL2. All rights are reserved by Satoru Takabayashi. THE SOFTWARE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND. Use this software at YOUR OWN RISK. I am looking forward to any BUG reports and the idea how to apply Namazu usefully.

Many documents and comments in source code are written in Japanese. I will translate that into English before long. For same reason, contributed softwares written in Japanese will translate into English, maybe.

Namazu home site: http://openlab.ring.gr.jp/namazu/ This is valid until my graduation (March,1999)

Index

Preamble

Unfortunately, this manual is now under construction. If I should get email from someone using Namazu from overseas, my motivation would rise :-).

Thanks to Seigo ISHIYAMA for the help of translation.

Background Information

At the beginning Namazu was made with only intention of Japanese use but now has been developing to handle English (ASCII charset) and other languages defined in ISO-8859-*. I have a desire to distribute Namazu to all over the world but there are many problems on Internationalization. So perhaps using Namazu in non-Japanese environment is currently little inconvinient.

System requirements

What you should install / What you shoul have installed in advance

About KAKASI/ChaSen

You need KAKASI or ChaSen if you want to deal Japanese (If you don't want, you don't need of course). KAKASI must be patched that -w option is valid. This patch is originally created to Japanize freeWAIS-sf by Hajime BABA. For more information, see freeWAIS-sf japanization information.

Known environments that Namazu works

Some of them are tested only by earlier version of Namazu. It is not sure that v1.3.0.0 works well under the conditions.

OS

C compiler

Perl

HTTP Server

Prerequisite to install Namazu on Win32

It is hard to make in Win32. With binary packages of Namazu, you do not have to do that. See Win32 Binary Package.

How to install

From source

Extract the Archive

At first, extract the Archive. with GNU tar:

tar xzvf namazu-xxx.tar.gz

If not:

gunzip -c namazu-xxx.tar.gz| tar xvf -
zcat namazu-xxx.tar.gz | tar xvf -

Execute configure

Then create Makefile.

        % ./configure --without-japanese # be careful!
	% make
	% su                          # switch the user to root, if needed.
	% make install

It is enough for most cases. In case of trouble, I might be help of you if you report the detail of your environment and error message.

How to use Namazu

Making Index

Namazu should make the index like a dictionary in advance of searching. a command `mknmz' do this task. Basic way is like this:

% mknmz /target/directory

You must specify the /target/directory which contains files you want to index. If /target/directory has subdirectories, `mknmz' recursively traverse them and do indexing.

After this processing is finished, `mknmz' makes files named ' NMZ.*' as index in current directory.

Searching

A command `namazu' is a search engine. Basic usage is like this:

% namazu "query" /index/directory ...

`query' can be specified with flexible conditions supported by `namazu'. See the section "Query specification" for details.

`/index/directory' that contains index (NMZ.*) what you want to search is must be specified at least one. You can enumrate directories to search multiple indices at once.

Running as CGI

At first, You can copy `namazu.cgi' to the direcotry allowed to run CGI. `namazu.cgi' search the index placed in INDEXDIR defined in Makefile as default index.

And you should edit NMZ.(head|foot|msg|body).en (`.en` means English message) which contains messages of search result pages.

Then you can edit namazu.conf (usually in /usr/local/namazu/lib defined as LIBDIR in Makefile) or .namazurc placed at the same directory as namazu.cgi to adjust URL in the result page. Normally, mknmz makes index which point to local files like /home/foo/public_html/baz.html, so the result page of CGI is must be substituted.

For example:

REPLACE /home/foo/public_html/ http://www.hoge.jp/%7Efoo/

It means to replace /home/foo/public_html/ with http://www.hoge.jp/%7Efoo/. They are MUST be separated with TAB characters.

If `namazu.cgi' works successfully, you are lucky :-)!

Query specification

This search system is case insensitive. You can use asterisk character at the end of the word to do forward match search, for instance: "foo*"

Separating keywords by spaces is automatically assumed to be AND-search that is to find only documents containing all of the specified keywords.

You can search the word containing symbols like "TCP/IP". However, this processing isn't perfect, so you can describe "TCP IP" instead of "TCP/IP", but it may cause noisy results.

This search system has boolean operators '&', '!', '|'. In place of symbols, the word "and", "or", "not", are accepted. Each operator must be separated by space.

For exapmle (both expressions is same meaning):

This sample finds the files which contain "sed" or "awk", and no "perl", but include "regexp".

You can use nested parenthesises expression for advanced search.

By surronding words with double quotation mark '"' or curly brace '{' '}', Namazu would recognize it as phrase but it is not perfect precision, so it cause wrong hit occasionally.

For exapmle (both expressions is same meaning):

Also, Namazu can do "regular expression search", "middle or backward match search" but it's little slow.

For exapmle:

You can do 'field specified search' as well if indices are prepared.

Happy searching!


Namazu homepage

satoru-t@is.aist-nara.ac.jp