See test page:
http://develop.twiki.org/~develop/cgi-bin/view/Sandbox/SearchTest
This page includes this search:
%STARTINCLUDE%
%SEARCH{ "%PAGENAME%" scope="text" nosearch="on" type="literal" excludetopic="%BASETOPIC%, %HOMETOPIC%" scope="text" web="%BASEWEB%" format=" * [[$web.$topic][$topic]] <br /><span class=\"twikiGrayText twikiSmall\">$summary</span>"}%
%STOPINCLUDE%
Note the
excludetopic="%BASETOPIC%, %BASEWEB%.%HOMETOPIC%"
Still WebHome topic is listed in the search results.
AC
Excluding
WebHome
does work,
%HOMETOPIC%
does not.
AC
This seems to be in
Search.pm
, sub
_makeTopicPattern
. But this code is over my head:
sub _makeTopicPattern {
my( $topic ) = @_ ;
return '' unless( $topic );
# 'Web*, FooBar' ==> ( 'Web*', 'FooBar' ) ==> ( 'Web.*', "FooBar" )
my @arr = map { s/[^\*\_$TWiki::regex{mixedAlphaNum}]//go; s/\*/\.\*/go; $_ }
split( /,\s*/, $topic );
return '' unless( @arr );
# ( 'Web.*', 'FooBar' ) ==> "^(Web.*|FooBar)$"
return '^(' . join( '|', @arr ) . ')$';
}
AC
The documentation is totally unclear on this point, but the list is a list of
topic names, not a list
web.topic specifiers.
Improved the doc in SVN 9531, 9532
CC
But
%HOMETOPIC%
also doesn't work. Wouldn't the variable be expanded before being processed?
AC
it works fine. i just fixed your example in Sandbox. try it.
CC
Closed with release of 4.0.2
KJL