Tags:
create new tag
view all tags

SID-01287: Cannot get formatted search to work

Status: Answered Answered TWiki version: 4.0.0 Perl version: Not sure sorry!
Category: CategorySearch Server OS: Windows Last update: 12 years ago

I've been trying without success to get the following example formatted search to work:

%SEARCH{ "[T]opicClassification.*?value=\"[P]ublicFAQ\"" ...

basically I get the header displayed but no hits come back. The following variation works okay:

%SEARCH{ "[T]opicClassification" ...

So it is the evaluation part that is failing for some reason.

Grateful for any ideas why this might be...

-- ColinStapleton - 2011-10-10

Discussion and Answer

Above search works if you have a type="regex" (regular expression search) and if you have a TWiki form attached to your pages that has a form field called "TopicClassification". What in a topic are you trying to query?

-- PeterThoeny - 2011-10-10

Thanks for getting back. I do have the type="regex" set. Full inline search I am using is the same as the example in FormattedSearch under heading "Table showing form field values of topics with a form". I have set up a form with the fields TopicClassification, OsVersion and OperatingSystem. The example doesn't specify the topic to be queried hence I figured it crawls all topics that feature the form with these fields in it.

-- ColinStapleton - 2011-10-10

Not sure why you do not get any hits if you have topics in the web that have the form attached. Is "TopicClassification" field of type "select"?

See also How to Create a TWiki Application tutorial.

-- PeterThoeny - 2011-10-10

Yes it is. Have looked at the How to Create a TWiki Application example and implemented that. The example suggests the following for implementing a report on ContactDB:

%SEARCH{ "form.name='ContactForm'" type="query" format="| $topic | $formfield(Salutation) | $formfield(Name) |" }%

However, when I do this I get the following result:

form.name='ContactForm'

The following search returns the expected results:

%SEARCH{ "Salutation" scope="text" regex="on" nosearch="on" nototal="on" format="| $topic | $formfield(Salutation) | $formfield(Name) |" }%

Hence, again, it seems to me that it is the evaluation part that is falling over.

-- ColinStapleton - 2011-10-10

-- ColinStapleton - 2011-11-30

      Change status to:
ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
SupportForm
Status Answered
Title Cannot get formatted search to work
SupportCategory CategorySearch
TWiki version 4.0.0
Server OS Windows
Web server Tinyweb
Perl version Not sure sorry!
Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2011-11-30 - ColinStapleton
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.