90 lines
1.7 KiB
Plaintext
90 lines
1.7 KiB
Plaintext
head 1.2;
|
|
access;
|
|
symbols;
|
|
locks; strict;
|
|
comment @# @;
|
|
|
|
|
|
1.2
|
|
date 2007.01.16.04.12.02; author TWikiContributor; state Exp;
|
|
branches;
|
|
next 1.1;
|
|
|
|
1.1
|
|
date 2006.02.01.12.01.25; author TWikiContributor; state Exp;
|
|
branches;
|
|
next ;
|
|
|
|
|
|
desc
|
|
@new-topic
|
|
@
|
|
|
|
|
|
1.2
|
|
log
|
|
@buildrelease
|
|
@
|
|
text
|
|
@---+ Package =TWiki::Search=
|
|
|
|
This module implements all the search functionality.
|
|
|
|
|
|
%TOC%
|
|
|
|
---++ ClassMethod *new* <tt>($session)</tt>
|
|
|
|
Constructor for the singleton Search engine object.
|
|
|
|
|
|
|
|
---++ StaticMethod *getTextPattern* <tt>($text,$pattern)</tt>
|
|
|
|
Sanitise search pattern - currently used for FormattedSearch only
|
|
|
|
|
|
|
|
---++ ObjectMethod *searchWeb* <tt>(...)</tt>
|
|
|
|
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 |'
|
|
|
|
|
|
@
|
|
|
|
|
|
1.1
|
|
log
|
|
@buildrelease
|
|
@
|
|
text
|
|
@d35 1
|
|
a35 1
|
|
SMELL: If =format= is set, =template= will be ignored.
|
|
d37 1
|
|
a37 1
|
|
SMELL: If =regex= is defined, it will force type='regex'
|
|
@
|