NAME
Wiki::Toolkit::Search::Lucy - Use Lucy to search your Wiki::Toolkit wiki.
SYNOPSIS
my $search = Wiki::Toolkit::Search::Lucy->new( path => "/var/lucy/wiki" );
my %wombat_nodes = $search->search_nodes( "wombat" );
Provides Lucy-based search methods for Wiki::Toolkit.
METHODS
- new
-
my $search = Wiki::Toolkit::Search::Lucy->new( path => "/var/lucy/wiki" );
Takes only one parameter, which is mandatory.
path
must be a directory for storing the indexed data. It should exist and be writeable. - index_node
-
$search->index_node( $node, $content );
Indexes or reindexes the given node in the search engine indexes. You must supply both the node name and its content.
- search_nodes
-
# Find all the nodes which contain the word 'expert'. my %results = $search->search_nodes( "expert" );
Returns a (possibly empty) hash whose keys are the node names and whose values are the scores.
Defaults to AND searches (if
$and_or
is not supplied, or is anything other thanOR
oror
).Searches are case-insensitive.