Tags:
search1Add my vote for this tag create new tag
, view all tags

Question

Hi,

I do not seem to be able to get the regex parameter to work in the WebSearchAdvanced topic, although I can get it to work with the %SEARCH variable.

I was looking for a character set value in one of our topics and could only remember the WE8 bit of it. So I went to the WebSearchAdvanced topic, checked the Regular Expression Search checkbox, punched in WE8.* and hit Search. I got Topics Found = 0.

I looked at the raw text and saw it was using the %SEARCH variable so I created a test page and put the following search string in

%SEARCH{"WE8.*" web="all" type="regex"}%

And up came all the pages.

Looking at the WebSearchAdvanced topic, it doesn't set type="regex" when the Regular Expression Search checkbox is checked, instead it sets regex="on" which the %SEARCH variable doesn't seem to use.

Obviously I could edit the Twiki.WebSearchAdvanced topic and make a correction to the search function, but I'm unsure if it this is actually a bug in the topic or just a configuration issue that I don't yet know about.

Anyone any ideas on this?

Thanks in advance.

Environment

TWiki version: TWikiRelease04x02x00
TWiki plugins: CommentPlugin, EditTablePlugin, EmptyPlugin, InterwikiPlugin, PreferencesPlugin, RenderListPlugin, SlideShowPlugin, SmiliesPlugin, SpreadSheetPlugin, TablePlugin, TinyMCEPlugin, TwistyPlugin, WysiwygPlugin
Server OS: Red Hat Enterprise Linux 5
Web server: httpd-2.2.3-11.el5.0.1
Perl version: perl-5.8.8-10.0.1
Client OS: Windows XP Service Pack 2
Web Browser: Internet Explorer 7
Categories: Search

-- JamesStone - 26 Jun 2008

Answer

ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.

TWikibug:Item3295 and TWikibug:Item5410 did report this earlier. It should be fixed in 4.2.1 (if it gets released wink )

-- FranzJosefGigler - 27 Jun 2008

I didn't see those entries when I searched for this bug, but my question is answered so thanks.

Just though I would point out what I did to make regex work (until the official bugfix comes along)

1. Move to the TWiki web and raw edit the WebSearchAdvanced topic 2. Change the SEARCH function at top by replacing the line for the url parameter type with the following line

 type="%IF{" '%URLPARAM{regex}%' = 'on' " then="regex" else="%URLPARAM{"type" default="word"}%"}%"

-- JamesStone - 01 Jul 2008

 
Change status to:
Topic revision: r3 - 2008-07-01 - JamesStone
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by PerlIdeas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.