data/TWiki/VarSEARCH.txt,v
changeset 0 414e01d06fd5
child 1 e2915a7cbdfa
equal deleted inserted replaced
-1:000000000000 0:414e01d06fd5
       
     1 head	1.4;
       
     2 access;
       
     3 symbols;
       
     4 locks; strict;
       
     5 comment	@# @;
       
     6 
       
     7 
       
     8 1.4
       
     9 date	2008.01.22.03.21.31;	author TWikiContributor;	state Exp;
       
    10 branches;
       
    11 next	1.3;
       
    12 
       
    13 1.3
       
    14 date	2007.01.16.04.12.03;	author TWikiContributor;	state Exp;
       
    15 branches;
       
    16 next	1.2;
       
    17 
       
    18 1.2
       
    19 date	2006.10.25.00.22.00;	author TWikiContributor;	state Exp;
       
    20 branches;
       
    21 next	1.1;
       
    22 
       
    23 1.1
       
    24 date	2006.06.25.16.26.29;	author TWikiContributor;	state Exp;
       
    25 branches;
       
    26 next	;
       
    27 
       
    28 
       
    29 desc
       
    30 @buildrelease
       
    31 @
       
    32 
       
    33 
       
    34 1.4
       
    35 log
       
    36 @buildrelease
       
    37 @
       
    38 text
       
    39 @%META:TOPICINFO{author="TWikiContributor" date="1168735612" format="1.1" version="4"}%
       
    40 %META:TOPICPARENT{name="TWikiVariables"}%
       
    41 #VarSEARCH
       
    42 
       
    43 ---+++ SEARCH{"text"} -- search content
       
    44    * Inline search, shows a search result embedded in a topic
       
    45    * Syntax: =%<nop>SEARCH{"text" ...}%=
       
    46    * Supported parameters:
       
    47      | *Parameter:* | *Description:* | *Default:* |
       
    48      | ="text"= | Search term. Is a keyword search, literal search, regular expression search, or query, depending on the =type= parameter. SearchHelp has more | required |
       
    49      | =search="text"= | (Alternative to above) | N/A |
       
    50      | =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 |
       
    51      | =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 |
       
    52      | =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 |
       
    53      | =scope="topic"= <br /> =scope="text"= <br /> =scope="all"= | Search topic name (title); the text (body) of topic; or all (title and body) | ="text"= |
       
    54      | =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%) |
       
    55      | =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 |
       
    56      | =limit="all"= <br /> =limit="16"= | Limit the number of results returned. This is done after sorting if =order= is specified | All results |
       
    57      | =date="..."= | limits the results to those pages with latest edit time in the given [[TimeSpecifications#TimeIntervals][time interval]].  | All results |
       
    58      | =reverse="on"= | Reverse the direction of the search | Ascending search |
       
    59      | =casesensitive="on"= | Case sensitive search | Ignore case |
       
    60      | =bookview="on"= | BookView search, e.g. show complete topic text | Show topic summary |
       
    61      | =nonoise="on"= | Shorthand for =nosummary="on" nosearch="on" nototal="on" zeroresults="off" noheader="on" noempty="on"= | Off |
       
    62      | =nosummary="on"= | Show topic title only | Show topic summary |
       
    63      | =nosearch="on"= | Suppress search string | Show search string |
       
    64      | =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) |
       
    65      | =nototal="on"= | Do not show number of topics found | Show number |
       
    66      | =zeroresults="off"= | Suppress all output if there are no hits | =zeroresults="on"=, displays: "Number of topics: 0" |
       
    67      | =noempty="on"= | Suppress results for webs that have no hits. | Show webs with no hits |
       
    68      | =header="..."= <br /> =format="..."= | Custom format results: see *[[FormattedSearch]]* for usage, variables &amp; examples | Results in table |
       
    69      | =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 |
       
    70      | =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 |
       
    71      | =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= |
       
    72      | =recurse="on"= | Recurse into subwebs, if subwebs are enabled. | =off= |
       
    73      | =separator=", "= | Line separator _between_ search hits | ="$n"= (Newline) |
       
    74      | =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) |
       
    75    * Example: =%<nop>SEARCH{"wiki" web="%USERSWEB%" scope="topic"}%=
       
    76    * 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]])_
       
    77    * %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%" }%=
       
    78    * Related: [[%IF{"'%INCLUDINGTOPIC%'='TWikiVariables'" then="#"}%VarMETASEARCH][METASEARCH]], [[%IF{"'%INCLUDINGTOPIC%'='TWikiVariables'" then="#"}%VarTOPICLIST][TOPICLIST]], [[%IF{"'%INCLUDINGTOPIC%'='TWikiVariables'" then="#"}%VarWEBLIST][WEBLIST]], FormattedSearch, SearchHelp, SearchPatternCookbook, RegularExpression
       
    79 @
       
    80 
       
    81 
       
    82 1.3
       
    83 log
       
    84 @buildrelease
       
    85 @
       
    86 text
       
    87 @d1 1
       
    88 a1 1
       
    89 %META:TOPICINFO{author="TWikiContributor" date="1168735612" format="1.1" version="3"}%
       
    90 d10 1
       
    91 a10 1
       
    92      | ="text"= | Search term. Is a keyword search, literal search or regular expression search, depending on the =type= parameter. SearchHelp has more | required |
       
    93 d12 1
       
    94 a12 1
       
    95      | =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 |
       
    96 d15 2
       
    97 a16 2
       
    98      | =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%) |
       
    99      | =scope="topic"= <br /> =scope="text"= <br /> =scope="all"= | Search topic name (title); the text (body) of topic; or all (both) | ="text"= |
       
   100 d19 1
       
   101 a19 1
       
   102      | =date="..."= | limits the results to those pages with latest edit time in the given TimeInterval.  | All results |
       
   103 d37 1
       
   104 a37 1
       
   105    * Example: =%<nop>SEARCH{"wiki" web="%MAINWEB%" scope="topic"}%=
       
   106 d40 1
       
   107 a40 1
       
   108    * Related: [[#VarMETASEARCH][METASEARCH]], [[#VarTOPICLIST][TOPICLIST]], [[#VarWEBLIST][WEBLIST]], FormattedSearch, SearchHelp, SearchPatternCookbook, RegularExpression
       
   109 @
       
   110 
       
   111 
       
   112 1.2
       
   113 log
       
   114 @buildrelease
       
   115 @
       
   116 text
       
   117 @d1 1
       
   118 a1 1
       
   119 %META:TOPICINFO{author="TWikiContributor" date="1111929255" format="1.2" version="2"}%
       
   120 d26 1
       
   121 a26 1
       
   122      | =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) |
       
   123 d40 1
       
   124 a40 2
       
   125    * Related: [[#VarMETASEARCH][METASEARCH]], [[#VarTOPICLIST][TOPICLIST]], [[#VarWEBLIST][WEBLIST]], FormattedSearch
       
   126 
       
   127 @
       
   128 
       
   129 
       
   130 1.1
       
   131 log
       
   132 @buildrelease
       
   133 @
       
   134 text
       
   135 @d1 1
       
   136 a1 1
       
   137 %META:TOPICINFO{author="TWikiContributor" date="1111929255" format="1.2" version="1"}%
       
   138 d35 2
       
   139 a36 1
       
   140      | =separator=", "= | Line separator between hits | Newline ="$n"= |
       
   141 @