<<O>>  Difference Topic GenerateSearchPlugin (r1.5 - 13 May 2005 - TWikiGuest)

Generate Search Plugin

This plugin creates a form-driven search over the topics of a selected web.

Line: 15 to 15

Parameter: Description: Default:
"topicregex" A regular expression determining the topics to be searched required
form="..." The topic defining the field values Current topic
Changed:
<
<
web="..." The webs that will be searched, separated by commas. If there is more than one web, a select is presented to the user that allows to search any single one or all of the indicated webs
>
>
web="..." The webs that will be searched, separated by commas. If there is more than one web, a select is presented to the user that allows to search any single one or all of the indicated webs Current web
all="..." If off, generates a select menu to choose among the possible webs to be searched; if on, all webs (see above) are searched. on

title="..." The heading for the search page generated  
message="..." Additional explanatory text to be added before the filter block  
initial="..." Determines whether the initial rendering of the search form also executes the search. Possible values are on, off on
 <<O>>  Difference Topic GenerateSearchPlugin (r1.4 - 13 May 2005 - TWikiGuest)

Generate Search Plugin

This plugin creates a form-driven search over the topics of a selected web.

Line: 15 to 15

Parameter: Description: Default:
"topicregex" A regular expression determining the topics to be searched required
form="..." The topic defining the field values Current topic
Changed:
<
<
web="..." The web from which the topic is taken Current web
>
>
web="..." The webs that will be searched, separated by commas. If there is more than one web, a select is presented to the user that allows to search any single one or all of the indicated webs

title="..." The heading for the search page generated  
message="..." Additional explanatory text to be added before the filter block  
initial="..." Determines whether the initial rendering of the search form also executes the search. Possible values are on, off on
Line: 81 to 81

Plugin Info

Plugin Author: TWiki:Main/ThomasWeigert
Changed:
<
<
Plugin Version: 25 Feb 2005 (V1.000)
>
>
Plugin Version: 13 Apr 2005 (V1.000)

Change History: <!-- versions below in reverse order --> 
Added:
>
>
13 Apr 2005: Added the ability to search through multiple webs

25 Feb 2005: Initial version
TWiki Dependency: $TWiki::Plugins::VERSION 1.024
CPAN Dependencies: none
Line: 95 to 96

Related Topics: TWikiForms

Changed:
<
<
-- TWiki:Main/ThomasWeigert - 25 Feb 2005
>
>
-- TWiki:Main/ThomasWeigert - 13 Apr 2005

META FILEATTACHMENT search.jpg attr="h" comment="" date="1109303670" path="E:\www\twiki-cairo\data\Test\search.jpg" size="26573" user="guest" version="1.1"
 <<O>>  Difference Topic GenerateSearchPlugin (r1.3 - 25 Feb 2005 - TWikiGuest)
Changed:
<
<

Search Plugin

>
>

Generate Search Plugin


This plugin creates a form-driven search over the topics of a selected web.

Line: 10 to 10

Syntax Rules

Changed:
<
<
  • Syntax: %GENSEARCH{"topic" ...}%
>
>
  • Syntax: %GENERATESEARCH{"topic" ...}%

  • Supported parameters:
    Parameter: Description: Default:
    "topicregex" A regular expression determining the topics to be searched required
Line: 35 to 35

will expand as follows:

Changed:
<
<
Output Expected
FieldShowFilter
TopicClassification
OperatingSystem
OsVersion
Select all
FieldShowFilter
TopicClassification
OperatingSystem
OsVersion
Select all
>
>
Output     Expected
FieldShowFilter
TopicClassification
OperatingSystem
OsVersion
Select all
   
FieldShowFilter
TopicClassification
OperatingSystem
OsVersion
Select all

Selecting "Show" for a field will display this field for search results. Selecting "Filter" for a field will allow to filter search results by specific values. If the user were to select all fields (for which the "Select all" short cut can be used), the following query page would be generated: Line: 67 to 73

pub/TWiki/GenerateSearchPlugin/search.jpg Attached graphic
pub/TWiki/GenerateSearchPlugin/search.jpg,v Attached graphic repository
bin/gensearch cgi script
Changed: <
<
=templates/oopsgensearch.tmpl Template defining the appearance of the search page
>
>
templates/oopsgensearch.tmpl Template defining the appearance of the search page

lib/TWiki/Plugins/GenerateSearchPlugin.pm Plugin Perl module
  • Test if the installation was successful:
    • See if above example rendered correctly
Line: 87 to 93
Feedback: http://TWiki.org/cgi-bin/view/Plugins/GenerateSearchPluginDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/GenerateSearchPluginAppraisal
Deleted: <
< Limitation: Due to a restriction in the browser rendering engine (which I have not found documented), only approximately 40 fields can be used. Beyond this value, the form is not submitted. The form may contain more fields, but only 40 can be selected. Both show and filter count in the query creation form, thus it is best to use only one of these if many fields are desired (rememberthat filter implies show anyway). This restriction has been found in Internet Explorer.
Related Topics: TWikiForms

-- TWiki:Main/ThomasWeigert - 25 Feb 2005

 <<O>>  Difference Topic GenerateSearchPlugin (r1.2 - 25 Feb 2005 - TWikiGuest)

Search Plugin

This plugin creates a form-driven search over the topics of a selected web.

Line: 31 to 31

If this plugins is installed, the variable


Changed:
<
<
%GENSEARCH{topic="Web.*" title="Search knowledge base" initial="off" message="(may use regular expressions)" }%
>
>
FieldShowFilter
TopicClassification
OperatingSystem
OsVersion
Select all

will expand as follows:

Added:
>
>
Output Expected

FieldShowFilter
TopicClassification
OperatingSystem
OsVersion
Select all
Added:
>
>
FieldShowFilter
TopicClassification
OperatingSystem
OsVersion
Select all

Selecting "Show" for a field will display this field for search results. Selecting "Filter" for a field will allow to filter search results by specific values. If the user were to select all fields (for which the "Select all" short cut can be used), the following query page would be generated:

 <<O>>  Difference Topic GenerateSearchPlugin (r1.1 - 24 Feb 2005 - TWikiGuest)
Line: 1 to 1
Added:
>
>

Search Plugin

This plugin creates a form-driven search over the topics of a selected web.

TWiki:Main/TWikiInstallation demonstrates a widely used TWiki application: A search where the search results can be filtered based on parameters entered by the user in a form.

This plugin generates such searches automatically from the field values defined in a TWikiForms. The user is presented with a table of possible fields and can select whether the field should be shown as the result of the search, and whether it should be possible to filter on that field.

Syntax Rules

  • Syntax: %GENSEARCH{"topic" ...}%
  • Supported parameters:
    Parameter: Description: Default:
    "topicregex" A regular expression determining the topics to be searched required
    form="..." The topic defining the field values Current topic
    web="..." The web from which the topic is taken Current web
    title="..." The heading for the search page generated  
    message="..." Additional explanatory text to be added before the filter block  
    initial="..." Determines whether the initial rendering of the search form also executes the search. Possible values are on, off on

Example

Below is an example form from TWikiForms:

Name Type Size Values Tooltip message
TopicClassification select 1 NoDisclosure, PublicSupported, PublicFAQ blah blah...
OperatingSystem checkbox 3 OsHPUX, OsLinux, OsSolaris, OsWin blah blah...
OsVersion text 16   blah blah...

If this plugins is installed, the variable

%GENSEARCH{topic="Web.*" title="Search knowledge base" initial="off" message="(may use regular expressions)" }%

will expand as follows:

FieldShowFilter
TopicClassification
OperatingSystem
OsVersion
Select all

Selecting "Show" for a field will display this field for search results. Selecting "Filter" for a field will allow to filter search results by specific values. If the user were to select all fields (for which the "Select all" short cut can be used), the following query page would be generated:

search.jpg

As can be seen, fields with defined values yield a drop down menu to select the possible values (this works for select, radio, and checkbox fields), while all other fields have a text box to enter values. The search result is filtered such that the form fields contain the filter values. Note that this search uses regular expression, and thus, regular expressions may also be entered as filters. (Note that "Filter" implies "Show".)

Plugin Settings

  • One line description, is shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = This plugin generates a form-driven search based on a TWikiForms.

  • Debug plugin: (See output in data/debug.txt)
    • Set DEBUG = 1

Plugin Installation Instructions

Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running.

  • Download the ZIP file from the Plugin web (see below)
  • Unzip GenerateSearchPlugin.zip in your twiki installation directory. Content:
    File: Description:
    data/TWiki/GenerateSearchPlugin.txt Plugin topic
    data/TWiki/GenerateSearchPlugin.txt,v Plugin topic repository
    pub/TWiki/GenerateSearchPlugin/search.jpg Attached graphic
    pub/TWiki/GenerateSearchPlugin/search.jpg,v Attached graphic repository
    bin/gensearch cgi script
    =templates/oopsgensearch.tmpl Template defining the appearance of the search page
    lib/TWiki/Plugins/GenerateSearchPlugin.pm Plugin Perl module
  • Test if the installation was successful:
    • See if above example rendered correctly

Plugin Info

Plugin Author: TWiki:Main/ThomasWeigert
Plugin Version: 25 Feb 2005 (V1.000)
Change History: <!-- versions below in reverse order --> 
25 Feb 2005: Initial version
TWiki Dependency: $TWiki::Plugins::VERSION 1.024
CPAN Dependencies: none
Other Dependencies: none
Perl Version: 5.005
TWiki:Plugins/Benchmark: GoodStyle nn%, FormattedSearch nn%, GenerateSearchPlugin nn%
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/GenerateSearchPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/GenerateSearchPluginDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/GenerateSearchPluginAppraisal

Limitation: Due to a restriction in the browser rendering engine (which I have not found documented), only approximately 40 fields can be used. Beyond this value, the form is not submitted. The form may contain more fields, but only 40 can be selected. Both show and filter count in the query creation form, thus it is best to use only one of these if many fields are desired (rememberthat filter implies show anyway). This restriction has been found in Internet Explorer.

Related Topics: TWikiForms

-- TWiki:Main/ThomasWeigert - 25 Feb 2005

META FILEATTACHMENT search.jpg attr="h" comment="" date="1109303670" path="E:\www\twiki-cairo\data\Test\search.jpg" size="26573" user="guest" version="1.1"
View topic | Diffs | r1.5 | > | r1.4 | > | r1.3 | More
Revision r1.1 - 24 Feb 2005 - 22:53 - TWikiGuest
Revision r1.5 - 13 May 2005 - 16:54 - TWikiGuest