1Wiki::Toolkit::Search::UPsleurceCnoen(t3r)ibuted Perl DoWciukmie:n:tTaotoiloknit::Search::Plucene(3)
2
3
4

NAME

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

SYNOPSIS

10         my $search = Wiki::Toolkit::Search::Plucene->new( path => "/var/plucene/wiki" );
11         my %wombat_nodes = $search->search_nodes("wombat");
12
13       Provides search-related methods for Wiki::Toolkit.
14

METHODS

16       new
17             my $search = Wiki::Toolkit::Search::Plucene->new(
18                              path => "/var/plucene/wiki",
19                              content_munger => sub {
20                                  my $content = shift;
21                                  $content =~ s/secretword//gs;
22                                  return $content;
23                              },
24                              node_filter => sub {
25                                  my %args = @_;
26                                  return $args{content} =~ /REDIRECT/ ? 0 : 1;
27                              },
28             );
29
30           The "path" parameter is mandatory. "path" must be a directory for
31           storing the indexed data.  It should exist and be writeable.
32
33           The "content_munger" parameter is optional.  It should be a
34           reference to a subroutine which takes the node content as a string
35           and returns another string which will be indexed in place of the
36           original content.
37
38           The "node_filter" parameter is also optional.  It should be a
39           reference to a subroutine which takes the named arguments "node"
40           and "content", and returns either true (yes, index this node) or
41           false (no, don't index this node).
42
43           Content munging takes place BEFORE node filtering.
44

SEE ALSO

46       Wiki::Toolkit, Wiki::Toolkit::Search::Base.
47
48
49
50perl v5.32.0                      2020-07-28 Wiki::Toolkit::Search::Plucene(3)
Impressum