Search::Namazu - Namazu library module for perl use Search::Namazu; @hlists = Search::Namazu::Search(index => '/usr/local/namazu/index', query => 'foo'); foreach my $hlist (@hlists) { print ($hlist->score, $hlist->uri, $hlist->date, $hlist->rank); } This module is an interface for Namazu library. Namazu is an implement of full text retrieval search system. It is available at: http://www.namazu.org/

OVERVIEW
The module implements Search::Namazu::Search function for searching. When the function is called, it will return the results as an array of Search::Namazu::Result object. Search::Namazu::Result object has the score, URI, date and ranking as results of searching.

Search::Namazu::Search
Search::Namazu::Search function has a reference of hash value as the argument. Keys for the hash are the following: index Specify a path of index. If you want to specify a index, you will need to specify the path as a scalar value. However, if you want to specify some indices, you will need to specify the paths as an array reference. For example: @result = Search::Namazu::Search( index => ['/var/www/index/site1', '/var/www/index/site2'], query => 'foo' ); query Specify a query expression as string. Expression syntax is same as namazu command. sortMethod Specify sort method of results. You can use the following values: Order by date. Order by score. Order by fields. If you ommit this option, it is treated as same as NMZ_SORTBYDATE. sortOrder Specify sort order of results. You can use the following values: Descend order. Ascend order. If you ommit this option, it is treated as same as NMZ_DESCENDSORT. lang Specify language.

Search::Namazu::Result
Search::Namazu::Result object is for keeping result information. It has the following methods: score It returns score. uri It returns URI. date It returns date. rank It returns ranking number. summary It returns summary. title It returns title. author It returns author. Copyright 1999,2000,2001,2002 NOKUBI Takatsugu All rights reserved. This is free software with ABSOLUTELY NO WARRANTY. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA