Wiki::Toolkit::Search::Plucene - Use Plucene to search your Wiki::Toolkit wiki.
my $search = Wiki::Toolkit::Search::Plucene->new( path => "/var/plucene/wiki" ); my %wombat_nodes = $search->search_nodes("wombat");
Provides search-related methods for Wiki::Toolkit.
my $search = Wiki::Toolkit::Search::Plucene->new( path => "/var/plucene/wiki", content_munger => sub { my $content = shift; $content =~ s/secretword//gs; return $content; }, node_filter => sub { my %args = @_; return $args{content} =~ /REDIRECT/ ? 0 : 1; }, );
The path parameter is mandatory. path must be a directory for storing the indexed data. It should exist and be writeable.
path
The content_munger parameter is optional. It should be a reference to a subroutine which takes the node content as a string and returns another string which will be indexed in place of the original content.
content_munger
The node_filter parameter is also optional. It should be a reference to a subroutine which takes the named arguments node and content, and returns either true (yes, index this node) or false (no, don't index this node).
node_filter
node
content
Content munging takes place BEFORE node filtering.
Wiki::Toolkit, Wiki::Toolkit::Search::Base.
To install Wiki::Toolkit, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Wiki::Toolkit
CPAN shell
perl -MCPAN -e shell install Wiki::Toolkit
For more information on module installation, please visit the detailed CPAN module installation guide.