aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel McManus <gmcmanus@gmail.com>2008-07-17 20:37:08 +1000
committerJoey Hess <joey@kodama.kitenet.net>2008-07-19 13:23:02 -0400
commite3b0584a493d4d2178bc7c48ff89fde766ff322b (patch)
tree607fc4a221b6dd6e3d8f6c3fdec310c534638cc6
parentc7b400af424847d9ed690e6126556cd186886c2a (diff)
downloadikiwiki-e3b0584a493d4d2178bc7c48ff89fde766ff322b.tar
ikiwiki-e3b0584a493d4d2178bc7c48ff89fde766ff322b.tar.gz
Use correct term prefixes when searching.
The Z term prefix is for stemming and shouldn't be used here. X is for custom fields.
-rw-r--r--IkiWiki/Plugin/search.pm4
-rw-r--r--templates/searchquery.tmpl2
2 files changed, 3 insertions, 3 deletions
diff --git a/IkiWiki/Plugin/search.pm b/IkiWiki/Plugin/search.pm
index 822b5974e..eedfa6924 100644
--- a/IkiWiki/Plugin/search.pm
+++ b/IkiWiki/Plugin/search.pm
@@ -123,9 +123,9 @@ 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);
diff --git a/templates/searchquery.tmpl b/templates/searchquery.tmpl
index 0d6eb6398..782b12cab 100644
--- a/templates/searchquery.tmpl
+++ b/templates/searchquery.tmpl
@@ -1,5 +1,5 @@
$setmap{prefix,title,S}
-$setmap{prefix,link,LINK}
+$setmap{prefix,link,XLINK}
$set{thousand,$.}$set{decimal,.}$setmap{BN,,Any Country,uk,England,fr,France}
${
$def{PREV,