internal package
Foswiki::UI::Search internal package
Foswiki::UI::Search StaticMethod
search( $session ) Parameter: | Description: | Default: |
---|---|---|
scope="topic" scope="text" scope="all" |
Search topic name (title); the text (body) of topic; or all (both) | "text" |
type="keyword" type="literal" type="regex" |
Do a keyword search like soap "web service" -shampoo ; a literal search like web service ; or Regular Expression search like soap;web service;!shampoo |
%SEARCHVAR- DEFAULTTYPE% preferences setting (literal) |
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 Time Interval. | All results |
topic="WebPreferences" topic="*Bug" |
Limit search to topics: A topic, a topic with asterisk wildcards, or a list of topics separated by comma. | All topics in a web |
reverse="on" |
Reverse the direction of the search | Ascending search |
web="Name" web="Users, Know" web="all" |
Comma-separated list of webs to search. The special word all means all webs that do not have the NOSEARCHALL variable set to on in their Web Preferences. You can specifically exclude webs from an all search using a minus sign - for example, web="all,-Secretweb" . |
Current web |
casesensitive="on" |
Case sensitive search | Ignore case |
search="text" |
(Alternative to above) | N/A |
separator=", " |
Line separator between hits | Newline "$n" |
excludetopic="Web*" excludetopic="WebHome, WebChanges" |
Exclude topics from search: A topic, a topic with asterisk wildcards, or a list of topics separated by comma. | None |
nonoise="on" |
Shorthand for nosummary="on" nosearch="on" nototal="on" zeroresults="off" noheader="on" noempty="on" |
Off |
nofinalnewline="on" |
If on , the search variable does not end in a line by itself. Any text continuing immediately after the search tag on the same line will be rendered as part of the table generated by the search, if appropriate. |
off |
multiple="on" |
Multiple hits per topic. Each hit can be formatted. The last token is used in case of a regular expression ";" and search | Only one hit per topic |
expandvariables="on" |
Expand variables before applying a Formatted Search on a search hit. Useful to show the expanded text, e.g. to show the result of a Spread Sheet Plugin %CALC{}% instead of the formula |
Raw text |
"text" |
Search term. Is a keyword search, literal search or regular expression search, depending on the type parameter. Search Help has more |
required |
header="..." format="..." |
Custom format results: see Formatted Search for usage, variables & examples | Results in table |
nototal="on" |
Do not show number of topics found | Show number |
noheader="on" |
Suppress search header Topics: Changed: By: |
Show search header |
nosearch="on" |
Suppress search string | Show search string |
bookview="on" |
Book View search, e.g. show complete topic text | Show topic summary |
nosummary="on" |
Show topic title only | Show topic summary |
noempty="on" |
Suppress results for webs that have no hits. | Show webs with no hits |
order="topic" order="created" order="modified" order="editby" order= |
Sort the results of search by the topic names, topic creation time, last modified time, last editor, or named field of Data Forms. The sorting is done web by web; in case you want to sort across webs, create a formatted table and sort it with Table Plugin's initsort | Sort by topic name |
zeroresults="off" |
Suppress all output if there are no hits | zeroresults="on" , displays: "Number of topics: 0" |