data/TWiki/VarSEARCH.txt,v
changeset 0 414e01d06fd5
child 1 e2915a7cbdfa
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/data/TWiki/VarSEARCH.txt,v	Sat Jan 26 15:50:53 2008 +0100
     1.3 @@ -0,0 +1,141 @@
     1.4 +head	1.4;
     1.5 +access;
     1.6 +symbols;
     1.7 +locks; strict;
     1.8 +comment	@# @;
     1.9 +
    1.10 +
    1.11 +1.4
    1.12 +date	2008.01.22.03.21.31;	author TWikiContributor;	state Exp;
    1.13 +branches;
    1.14 +next	1.3;
    1.15 +
    1.16 +1.3
    1.17 +date	2007.01.16.04.12.03;	author TWikiContributor;	state Exp;
    1.18 +branches;
    1.19 +next	1.2;
    1.20 +
    1.21 +1.2
    1.22 +date	2006.10.25.00.22.00;	author TWikiContributor;	state Exp;
    1.23 +branches;
    1.24 +next	1.1;
    1.25 +
    1.26 +1.1
    1.27 +date	2006.06.25.16.26.29;	author TWikiContributor;	state Exp;
    1.28 +branches;
    1.29 +next	;
    1.30 +
    1.31 +
    1.32 +desc
    1.33 +@buildrelease
    1.34 +@
    1.35 +
    1.36 +
    1.37 +1.4
    1.38 +log
    1.39 +@buildrelease
    1.40 +@
    1.41 +text
    1.42 +@%META:TOPICINFO{author="TWikiContributor" date="1168735612" format="1.1" version="4"}%
    1.43 +%META:TOPICPARENT{name="TWikiVariables"}%
    1.44 +#VarSEARCH
    1.45 +
    1.46 +---+++ SEARCH{"text"} -- search content
    1.47 +   * Inline search, shows a search result embedded in a topic
    1.48 +   * Syntax: =%<nop>SEARCH{"text" ...}%=
    1.49 +   * Supported parameters:
    1.50 +     | *Parameter:* | *Description:* | *Default:* |
    1.51 +     | ="text"= | Search term. Is a keyword search, literal search, regular expression search, or query, depending on the =type= parameter. SearchHelp has more | required |
    1.52 +     | =search="text"= | (Alternative to above) | N/A |
    1.53 +     | =web="Name"= <br /> =web="%USERSWEB%, Know"= <br /> =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 %WEBPREFSTOPIC%. Note that TWikiAccessControls are respected when searching webs; it is *much* better to use them than =NOSEARCHALL=. | Current web |
    1.54 +     | =topic="%WEBPREFSTOPIC%"= <br /> =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 |
    1.55 +     | =excludetopic="Web*"= <br /> =excludetopic="%HOMETOPIC%, <nop>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 |
    1.56 +     | =scope="topic"= <br /> =scope="text"= <br /> =scope="all"= | Search topic name (title); the text (body) of topic; or all (title and body) | ="text"= |
    1.57 +     | =type="keyword"= <br /> =type="word"= <br /> =type="literal"= <br /> =type="regex"= <br /> =type="query"= | Control how the search is performed when =scope="text"= or =scope="all"= <hr /> =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 <hr /> =word=: identical to =keyword= but searches whole words: topics with "soapsuds" will not be found, and topics with "shampoos" will not be excluded <hr /> =literal=: search for the exact string, like =web service= <hr /> =regex=: use a RegularExpression search like =soap;web service;!shampoo=; to search on whole words use =\bsoap\b= <hr /> =query=: [[query search]] of form fields and other meta-data, like =(Firstname='Emma' OR Firstname='John') AND Lastname='Peel'= | =%<nop>SEARCHVAR- DEFAULTTYPE%= [[TWikiPreferences][preferences]] setting (%SEARCHVARDEFAULTTYPE%) |
    1.58 +     | =order="topic"= <br /> =order="created"= <br />  =order="modified"= <br /> =order="editby"= <br /> =order=<br />&nbsp;"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 [[FormattedSearch][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 |
    1.59 +     | =limit="all"= <br /> =limit="16"= | Limit the number of results returned. This is done after sorting if =order= is specified | All results |
    1.60 +     | =date="..."= | limits the results to those pages with latest edit time in the given [[TimeSpecifications#TimeIntervals][time interval]].  | All results |
    1.61 +     | =reverse="on"= | Reverse the direction of the search | Ascending search |
    1.62 +     | =casesensitive="on"= | Case sensitive search | Ignore case |
    1.63 +     | =bookview="on"= | BookView search, e.g. show complete topic text | Show topic summary |
    1.64 +     | =nonoise="on"= | Shorthand for =nosummary="on" nosearch="on" nototal="on" zeroresults="off" noheader="on" noempty="on"= | Off |
    1.65 +     | =nosummary="on"= | Show topic title only | Show topic summary |
    1.66 +     | =nosearch="on"= | Suppress search string | Show search string |
    1.67 +     | =noheader="on"= | Suppress default search header <br /> <span style='background: #FFB0B0;'> *Topics: Changed: By:* </span>, unless a =header= is explicitly specified  | Show default search header, unless search is inline and a format is specified (Cairo compatibility) |
    1.68 +     | =nototal="on"= | Do not show number of topics found | Show number |
    1.69 +     | =zeroresults="off"= | Suppress all output if there are no hits | =zeroresults="on"=, displays: "Number of topics: 0" |
    1.70 +     | =noempty="on"= | Suppress results for webs that have no hits. | Show webs with no hits |
    1.71 +     | =header="..."= <br /> =format="..."= | Custom format results: see *[[FormattedSearch]]* for usage, variables &amp; examples | Results in table |
    1.72 +     | =expandvariables="on"= | Expand variables before applying a FormattedSearch on a search hit. Useful to show the expanded text, e.g. to show the result of a SpreadSheetPlugin =%<nop>CALC{}%= instead of the formula | Raw text |
    1.73 +     | =multiple="on"= | Multiple hits per topic. Each hit can be [[FormattedSearch][formatted]]. The last token is used in case of a regular expression ";" _and_ search | Only one hit per topic |
    1.74 +     | =nofinalnewline="on"= | If =on=, the search variable does not end in a line by itself. Any text continuing immediately after the search variable on the same line will be rendered as part of the table generated by the search, if appropriate. | =off= |
    1.75 +     | =recurse="on"= | Recurse into subwebs, if subwebs are enabled. | =off= |
    1.76 +     | =separator=", "= | Line separator _between_ search hits | ="$n"= (Newline) |
    1.77 +     | =newline="%<nop>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) |
    1.78 +   * Example: =%<nop>SEARCH{"wiki" web="%USERSWEB%" scope="topic"}%=
    1.79 +   * Example with format: =%<nop>SEARCH{"FAQ" scope="topic" nosearch="on" nototal="on" header="| *Topic: * | *Summary: * |" format="<nop>| $topic | $summary |"%= _(displays results in a table with header - [[FormattedSearch][details]])_
    1.80 +   * %H% Hint: If the TWiki:Plugins.TablePlugin is installed, you may set a =%<nop>TABLE{}%= variable just before the =%<nop>SEARCH{}%= to alter the output of a search.  Example: =%<nop>TABLE{ tablewidth="90%" }%=
    1.81 +   * Related: [[%IF{"'%INCLUDINGTOPIC%'='TWikiVariables'" then="#"}%VarMETASEARCH][METASEARCH]], [[%IF{"'%INCLUDINGTOPIC%'='TWikiVariables'" then="#"}%VarTOPICLIST][TOPICLIST]], [[%IF{"'%INCLUDINGTOPIC%'='TWikiVariables'" then="#"}%VarWEBLIST][WEBLIST]], FormattedSearch, SearchHelp, SearchPatternCookbook, RegularExpression
    1.82 +@
    1.83 +
    1.84 +
    1.85 +1.3
    1.86 +log
    1.87 +@buildrelease
    1.88 +@
    1.89 +text
    1.90 +@d1 1
    1.91 +a1 1
    1.92 +%META:TOPICINFO{author="TWikiContributor" date="1168735612" format="1.1" version="3"}%
    1.93 +d10 1
    1.94 +a10 1
    1.95 +     | ="text"= | Search term. Is a keyword search, literal search or regular expression search, depending on the =type= parameter. SearchHelp has more | required |
    1.96 +d12 1
    1.97 +a12 1
    1.98 +     | =web="Name"= <br /> =web="%MAINWEB%, Know"= <br /> =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 %WEBPREFSTOPIC%. Note that TWikiAccessControls are respected when searching webs; it is *much* better to use them than =NOSEARCHALL=. | Current web |
    1.99 +d15 2
   1.100 +a16 2
   1.101 +     | =type="keyword"= <br /> =type="literal"= <br /> =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= | =%<nop>SEARCHVAR- DEFAULTTYPE%= [[TWikiPreferences][preferences]] setting (%SEARCHVARDEFAULTTYPE%) |
   1.102 +     | =scope="topic"= <br /> =scope="text"= <br /> =scope="all"= | Search topic name (title); the text (body) of topic; or all (both) | ="text"= |
   1.103 +d19 1
   1.104 +a19 1
   1.105 +     | =date="..."= | limits the results to those pages with latest edit time in the given TimeInterval.  | All results |
   1.106 +d37 1
   1.107 +a37 1
   1.108 +   * Example: =%<nop>SEARCH{"wiki" web="%MAINWEB%" scope="topic"}%=
   1.109 +d40 1
   1.110 +a40 1
   1.111 +   * Related: [[#VarMETASEARCH][METASEARCH]], [[#VarTOPICLIST][TOPICLIST]], [[#VarWEBLIST][WEBLIST]], FormattedSearch, SearchHelp, SearchPatternCookbook, RegularExpression
   1.112 +@
   1.113 +
   1.114 +
   1.115 +1.2
   1.116 +log
   1.117 +@buildrelease
   1.118 +@
   1.119 +text
   1.120 +@d1 1
   1.121 +a1 1
   1.122 +%META:TOPICINFO{author="TWikiContributor" date="1111929255" format="1.2" version="2"}%
   1.123 +d26 1
   1.124 +a26 1
   1.125 +     | =noheader="on"= | Suppress search header <br /> <span style='background: #FFB0B0;'> *Topics: Changed: By:* </span> | Show search header, unless seach is inline and a format is specified (Cairo compatibility) |
   1.126 +d40 1
   1.127 +a40 2
   1.128 +   * Related: [[#VarMETASEARCH][METASEARCH]], [[#VarTOPICLIST][TOPICLIST]], [[#VarWEBLIST][WEBLIST]], FormattedSearch
   1.129 +
   1.130 +@
   1.131 +
   1.132 +
   1.133 +1.1
   1.134 +log
   1.135 +@buildrelease
   1.136 +@
   1.137 +text
   1.138 +@d1 1
   1.139 +a1 1
   1.140 +%META:TOPICINFO{author="TWikiContributor" date="1111929255" format="1.2" version="1"}%
   1.141 +d35 2
   1.142 +a36 1
   1.143 +     | =separator=", "= | Line separator between hits | Newline ="$n"= |
   1.144 +@