• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 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:

%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

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

SVN Range Sun, 19 Mar 2006 build 9373
AppliesTo Engine
Component

Priority Normal
CurrentState Closed
WaitingFor

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-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback