| Module name | TWiki::Search SearchDotPm |
| Location | TWIKIROOT/lib/TWiki/Search.pm |
| Summary | This module implements all the search functionality |
| Primary Author | Main. |
| CVS history | CVS:lib/TWiki/Search.pm |
| CVS alpha | CVSget:lib/TWiki/Search.pm |
| Contributing authors | (see CVS History) |
| Is Class | NO |
| First Release | to be filled out |
|
|
Purpose
To return HTML tabulating the occurances of the search strings, formatted according to user preferences.
Used by
This module is used by
SearchCgiScript and
TWikiDotPm
Please see
CodevDocumentationProject and
CodevDocumentationProjectDev for comments on the format of these pages.
| Note: | Below documentation is extracted from the currently installed TWiki::Search Perl module, which is done by the PerlDocPlugin |
package TWiki::Search
This module implements all the search functionality.
ClassMethod new ($session)
Constructor for the singleton Search engine object.
StaticMethod getTextPattern ( $text, $pattern )
Sanitise search pattern - currently used for FormattedSearch only
ObjectMethod searchWeb (...)
Search one or more webs according to the parameters.
If
_callback is set, that means the caller wants results as soon as they are ready.
_callback_ should be set to a reference to a function which takes =_cbdata as the first parameter and remaining parameters the same as 'print'.
If
_callback is set, the result is always undef. Otherwise the result is a string containing the rendered search results.
If
inline is set, then the results are
not decorated with the search template head and tail blocks.
Note: If
format is set,
template will be ignored.
Note: For legacy, if
regex is defined, it will force type='regex'
SMELL: If
template is defined
bookview will not work
SMELL: it seems that if you define
_callback or
inline then you are responsible for converting the TML to HTML yourself! FIXME:
callback cannot work with format parameter (consider format='| $topic |'
Contributors:
--
MartinCleaver - 23 Jun 2002
--
PeterThoeny - 02 Feb 2004
Discussions
Comments on the the
FatClientNess? of this module.
The module contains both HTML outputting fragments and searching fragments. The HTML fragments should be pulled back into the
SearchCgiScript so that only the searching fragments remain.
--
MartinCleaver - 23 Jun 2002