• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7700 for generic doc work for TWiki-6.0.2. Use View topic Item7703 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

See test page: http://develop.twiki.org/~develop/cgi-bin/view/Sandbox/SearchTest

This page includes this search:

%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>"}%
Note the excludetopic="%BASETOPIC%, %BASEWEB%.%HOMETOPIC%"

Still WebHome topic is listed in the search results.


Excluding WebHome does work, %HOMETOPIC% does not.


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 ) . ')$';


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


But %HOMETOPIC% also doesn't work. Wouldn't the variable be expanded before being processed?


it works fine. i just fixed your example in Sandbox. try it.


Closed with release of 4.0.2


Summary Excluding topic from SEARCH does not exclude WebHome (Doc improvement)
ReportedBy TWiki:Main.ArthurClemens

SVN Range Sun, 19 Mar 2006 build 9373
AppliesTo Engine

Priority Normal
CurrentState Closed

Checkins 9531 9532
TargetRelease patch
Edit | Attach | Watch | Print version | History: r9 < r8 < r7 < r6 < r5 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r9 - 2006-04-01 - KennethLavrsen
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback