• 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.

Item7099: SEARCH with PurePerl backend not working to find twiki words

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Normal No Action Required   n/a  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

I have an embedded search of the form:
%SEARCH{search="%TOPIC%" topic="NagSvc*" nosearch="on" noheader="on" nototal="on" format="   * [[$topic]] --- $pattern(.*Service Description\s*([^\n]{1,140}).*)..." }%

(this generates a list of twiki pages with the topic name and first 140 characters of the Service Description section). that was returning no hits.

A simplified search:

%SEARCH{ "%TOPIC%" }%

also returns no hits.

Using the search box returns the list of expected pages.

I am using cgi mode (not mod_perl) for twiki running under apache 2.2.3 with perl 5.8.8.

I narrowed it down today to a problem in lib/TWiki/Store/SearchAlgorithms/PurePerl.pm. If I change (line 58 approx) from:

    if ($options->{casesensitive}) {
        $doMatch = sub { $_[0] =~ m/$searchString/o };
    } else {
        $doMatch = sub { $_[0] =~ m/$searchString/oi };
    }

to

    if ($options->{casesensitive}) {
        $doMatch = sub { $_[0] =~ m/$searchString/ };
    } else {
        $doMatch = sub { $_[0] =~ m/$searchString/i };
    }

i.e. removing the "o" compile once option made the search work as intended.

I know the embedded search worked on an earlier (revision 4.x) search., but I am not positive that I was using the PurePerl search module at that time.

-- TWiki:Main/JohnRouillard - 2012-12-25

Actually it looks like I took a patch from http://mark.aufflick.com/blog/2008/07/20/twiki-on-fastcgi because I was trying to get TWiki working on fastcgi. I reverted the patch and the search still appears to work.

So this is an invalid ticket. Sorry about that.

-- JohnRouillard - 2012-12-25

ItemTemplate
Summary SEARCH with PurePerl backend not working to find twiki words
ReportedBy TWiki:Main.JohnRouillard
Codebase 5.1.1
SVN Range TWiki-5.1.3-trunk, Tue, 25 Dec 2012, build 24571
AppliesTo Engine
Component

Priority Normal
CurrentState No Action Required
WaitingFor

Checkins

TargetRelease n/a
ReleasedIn

Topic revision: r1 - 2012-12-25 - JohnRouillard
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback