|
META TOPICPARENT |
name="TWikiVariables" |
|
|
- Syntax:
%SEARCH{"text" ...}%
- Supported parameters:
|
|
< < |
"text" |
Search term. Is a keyword search, literal search or regular expression search, depending on the type parameter. SearchHelp has more |
required |
|
> > |
"text" |
Search term. Is a keyword search, literal search, regular expression search, or query, depending on the type parameter. SearchHelp has more |
required |
|
|
search="text" |
(Alternative to above) |
N/A |
|
|
< < |
web="Name" web="Public, Know" web="all" |
Comma-separated list of webs to search. You can specifically exclude webs from an all search using a minus sign - for example, web="all,-Secretweb" . The special word all means all webs that do not have the NOSEARCHALL variable set to on in their WebPreferences. Note that TWikiAccessControls are respected when searching webs; it is much better to use them than NOSEARCHALL . |
Current web |
|
> > |
web="Name" web="Public, Know" web="all" |
Comma-separated list of webs to search. You can specifically exclude webs from an all search using a minus sign - for example, web="all,-Secretweb" . The special word all means all webs that do not have the NOSEARCHALL variable set to on in their WebPreferences. Note that TWikiAccessControls are respected when searching webs; it is much better to use them than NOSEARCHALL . |
Current web |
|
|
topic="WebPreferences" topic="*Bug" |
Limit search to topics: A topic, a topic with asterisk wildcards, or a list of topics separated by comma. Note this is a list of topic names and must not include web names. |
All topics in a web |
excludetopic="Web*" excludetopic="WebHome, WebChanges" |
Exclude topics from search: A topic, a topic with asterisk wildcards, or a list of topics separated by comma. Note this is a list of topic names and must not include web names. |
None |
|
|
< < |
type="keyword" type="literal" type="regex" |
Do a keyword search like soap "web service" -shampoo ; a literal search like web service ; or RegularExpression search like soap;web service;!shampoo |
%SEARCHVAR- DEFAULTTYPE% preferences setting (literal) |
scope="topic" scope="text" scope="all" |
Search topic name (title); the text (body) of topic; or all (both) |
"text" |
|
> > |
scope="topic" scope="text" scope="all" |
Search topic name (title); the text (body) of topic; or all (title and body) |
"text" |
type="keyword" type="word" type="literal" type="regex" type="query" |
Control how the search is performed when scope="text" or scope="all" keyword : use Google-like controls as in soap "web service" -shampoo ; searches word parts: using the example, topics with "soapsuds" will be found as well, but topics with "shampoos" will be excluded word : identical to keyword but searches whole words: topics with "soapsuds" will not be found, and topics with "shampoos" will not be excluded literal : search for the exact string, like web service regex : use a RegularExpression search like soap;web service;!shampoo ; to search on whole words use \bsoap\b query : query search of form fields and other meta-data, like (Firstname='Emma' OR Firstname='John') AND Lastname='Peel' |
%SEARCHVAR- DEFAULTTYPE% preferences setting (literal) |
|
|
order="topic" order="created" order="modified" order="editby" order= "formfield(name)" |
Sort the results of search by the topic names, topic creation time, last modified time, last editor, or named field of TWikiForms. The sorting is done web by web; if you want to sort across webs, create a formatted table and sort it with TablePlugin's initsort. Note that dates are sorted most recent date last (i.e at the bottom of the table). |
Sort by topic name |
limit="all" limit="16" |
Limit the number of results returned. This is done after sorting if order is specified |
All results |
|
|
< < |
date="..." |
limits the results to those pages with latest edit time in the given TimeInterval. |
All results |
|
> > |
date="..." |
limits the results to those pages with latest edit time in the given time interval. |
All results |
|
|
reverse="on" |
Reverse the direction of the search |
Ascending search |
casesensitive="on" |
Case sensitive search |
Ignore case |
bookview="on" |
BookView search, e.g. show complete topic text |
Show topic summary |
|
|
recurse="on" |
Recurse into subwebs, if subwebs are enabled. |
off |
separator=", " |
Line separator between search hits |
"$n" (Newline) |
newline="%BR%" |
Line separator within a search hit. Useful if the format="" parameter contains a $pattern() that captures more than one line, i.e. contents of a textfield in a form. |
"$n" (Newline) |
|
|
< < |
- Example:
%SEARCH{"wiki" web="Public" scope="topic"}%
|
> > |
- Example:
%SEARCH{"wiki" web="Public" scope="topic"}%
|
|
- Example with format:
%SEARCH{"FAQ" scope="topic" nosearch="on" nototal="on" header="| *Topic: * | *Summary: * |" format="| $topic | $summary |"% (displays results in a table with header - details)
-
Hint: If the TWiki:Plugins.TablePlugin is installed, you may set a %TABLE{}% variable just before the %SEARCH{}% to alter the output of a search. Example: %TABLE{ tablewidth="90%" }%
|
|
< < | |
> > | |