X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/dbbc1e4040b737e4f42a621a7b3ee80521d02676..4691a2ad39cce273231fddd9a589b4f8fdc1b063:/IkiWiki/Plugin/search.pm diff --git a/IkiWiki/Plugin/search.pm b/IkiWiki/Plugin/search.pm index 284f477fa..eedfa6924 100644 --- a/IkiWiki/Plugin/search.pm +++ b/IkiWiki/Plugin/search.pm @@ -9,7 +9,7 @@ use IkiWiki 2.00; sub import { #{{{ hook(type => "checkconfig", id => "search", call => \&checkconfig); hook(type => "pagetemplate", id => "search", call => \&pagetemplate); - hook(type => "sanitize", id => "search", call => \&index); + hook(type => "postscan", id => "search", call => \&index); hook(type => "delete", id => "search", call => \&delete); hook(type => "cgi", id => "search", call => \&cgi); } # }}} @@ -48,8 +48,6 @@ my $scrubber; my $stemmer; sub index (@) { #{{{ my %params=@_; - - return $params{content} if $IkiWiki::preprocessing{$params{destpage}}; setupfiles(); @@ -125,15 +123,13 @@ sub index (@) { #{{{ $tg->index_text($caption, 2); $tg->index_text($title, 2) if $title ne $caption; $tg->index_text($toindex); - $tg->index_text(lc($title), 1, "ZS"); # for title:foo + $tg->index_text(lc($title), 1, "S"); # for title:foo foreach my $link (@{$links{$params{page}}}) { - $tg->index_text(lc($link), 1, "ZLINK"); # for link:bar + $tg->index_text(lc($link), 1, "XLINK"); # for link:bar } $doc->add_term($pageterm); $db->replace_document_by_term($pageterm, $doc); - - return $params{content}; } #}}} sub delete (@) { #{{{