Dominic Hargreaves > Wiki-Toolkit-0.82 > Wiki::Toolkit::Search::Lucy

Download:
Wiki-Toolkit-0.82.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  1
View/Report Bugs
Module Version: 0.02   Source   Latest Release: Wiki-Toolkit-0.84

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 than OR or or).

Searches are case-insensitive.

SEE ALSO ^

Wiki::Toolkit, Wiki::Toolkit::Search::Base.

syntax highlighting: