logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Wiki::Toolkit::Search::Plucene - Use Plucene to search your Wiki::Toolkit wiki.

Methods

new
             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.

           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.

           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).

           Content munging takes place BEFORE node filtering.

Name

       Wiki::Toolkit::Search::Plucene - Use Plucene to search your Wiki::Toolkit wiki.

See Also

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

perl v5.32.0                                       2021-01-04                Wiki::Toolkit::Search::Plucene(3pm)

Synopsis

         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.

See Also