Namazu-users-en(old)


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding a new field...



In article <3CA9DD33.1080705@xxxxxxxxx>
carlos@xxxxxxxxx writes:

>> How difficult would it be to add an additional field (for example, 
>> number of pages) to the Namazu document information?

It depends on kind of format.

For example, rfc822 messages are easy to do it. filter/mailnews.pl
creates field indexes of all headers in messages. But not of all
outputted, only bound to $SEARCH_FIELD variable in mknmzrc.

The following is an example of a part of mknmzrc.

$SEARCH_FIELD = "message-id|subject|from|date|uri|newsgroups|to|summary|size|x-ml-count";
%FIELD_ALIASES = ('title' => 'subject', 'author' => 'from',
                'x-mail-count' => 'x-ml-count',  'x-sequence' => 'x-ml-count');

It means:
* Output NMZ.field.x-ml-count
* x-mail-count and x-sequence header is treated as same as x-ml-count

As a result, the following query is treat as valid stuff by namazu.cgi.

http://search.namazu.org/cgi-bin/namazu.cgi?query=%2Bx-ml-count%3A00250&idxname=namazu-users-en

So if you want to add some field,
* Need to add fields to $SEARCH_FIELD in mknmzrc field
* Need to modify filter/* appropriately

I hope it helps you.
-- 
NOKUBI Takatsugu
E-mail: knok@xxxxxxxxxxxxx
	knok@xxxxxxxxxx / knok@xxxxxxxxxx