buildrelease
[openafs-wiki.git] / TWiki / VarSEARCH.mdwn
index 2a37942..a4a851f 100644 (file)
@@ -12,7 +12,7 @@
   </tr>
   <tr>
     <td><code>"text"</code></td>
-    <td> Search term. Is a keyword search, literal search or regular expression search, depending on the <code>type</code> parameter. [[Main/SearchHelp]] has more </td>
+    <td> Search term. Is a keyword search, literal search, regular expression search, or query, depending on the <code>type</code> parameter. [[Main/SearchHelp]] has more </td>
     <td> required </td>
   </tr>
   <tr>
@@ -21,7 +21,7 @@
     <td> N/A </td>
   </tr>
   <tr>
-    <td><code>web="Name"</code><br /><code>web="Main, Know"</code><br /><code>web="all"</code></td>
+    <td><code>web="Name"</code><br /><code>web="%USERSWEB%, Know"</code><br /><code>web="all"</code></td>
     <td> Comma-separated list of webs to search. You can specifically <strong>exclude</strong> webs from an <code>all</code> search using a minus sign - for example, <code>web="all,-Secretweb"</code>. The special word <code>all</code> means all webs that do <strong>not</strong> have the <code>NOSEARCHALL</code> variable set to <code>on</code> in their [[Main/WebPreferences]]. Note that [[Main/TWikiAccessControls]] are respected when searching webs; it is <strong>much</strong> better to use them than <code>NOSEARCHALL</code>. </td>
     <td> Current web </td>
   </tr>
     <td> None </td>
   </tr>
   <tr>
-    <td><code>type="keyword"</code><br /><code>type="literal"</code><br /><code>type="regex"</code></td>
-    <td> Do a keyword search like <code>soap "web service" -shampoo</code>; a literal search like <code>web service</code>; or [[Main/RegularExpression]] search like <code>soap;web service;!shampoo</code></td>
-    <td><code>%SEARCHVAR- DEFAULTTYPE%</code> [[Main/TWikiPreferences]] setting (%SEARCHVARDEFAULTTYPE%) </td>
-  </tr>
-  <tr>
     <td><code>scope="topic"</code><br /><code>scope="text"</code><br /><code>scope="all"</code></td>
-    <td> Search topic name (title); the text (body) of topic; or all (both) </td>
+    <td> Search topic name (title); the text (body) of topic; or all (title and body) </td>
     <td><code>"text"</code></td>
   </tr>
   <tr>
+    <td><code>type="keyword"</code><br /><code>type="word"</code><br /><code>type="literal"</code><br /><code>type="regex"</code><br /><code>type="query"</code></td>
+    <td> Control how the search is performed when <code>scope="text"</code> or <code>scope="all"</code><hr /><code>keyword</code>: use Google-like controls as in <code>soap "web service" -shampoo</code>; searches word parts: using the example, topics with "soapsuds" will be found as well, but topics with "shampoos" will be excluded <hr /><code>word</code>: identical to <code>keyword</code> but searches whole words: topics with "soapsuds" will not be found, and topics with "shampoos" will not be excluded <hr /><code>literal</code>: search for the exact string, like <code>web service</code><hr /><code>regex</code>: use a [[Main/RegularExpression]] search like <code>soap;web service;!shampoo</code>; to search on whole words use <code>\bsoap\b</code><hr /><code>query</code>: [[Main/QuerySearch]] of form fields and other meta-data, like <code>(Firstname='Emma' OR Firstname='John') AND Lastname='Peel'</code></td>
+    <td><code>%SEARCHVAR- DEFAULTTYPE%</code> [[Main/TWikiPreferences]] setting (%SEARCHVARDEFAULTTYPE%) </td>
+  </tr>
+  <tr>
     <td><code>order="topic"</code><br /><code>order="created"</code><br /><code>order="modified"</code><br /><code>order="editby"</code><br /><code>order=<br /> "formfield(name)"</code></td>
     <td> Sort the results of search by the topic names, topic creation time, last modified time, last editor, or named field of [[Main/TWikiForms]]. The sorting is done web by web; if you want to sort across webs, create a [[Main/FormattedSearch]] table and sort it with [[Main/TablePlugin]]'s initsort. Note that dates are sorted most recent date <strong>last</strong> (i.e at the bottom of the table). </td>
     <td> Sort by topic name </td>
@@ -57,7 +57,7 @@
   </tr>
   <tr>
     <td><code>date="..."</code></td>
-    <td> limits the results to those pages with latest edit time in the given [[Main/TimeInterval]]. </td>
+    <td> limits the results to those pages with latest edit time in the given [[Main/TimeSpecifications#TimeIntervals]]. </td>
     <td> All results </td>
   </tr>
   <tr>
     <td><code>"$n"</code> (Newline) </td>
   </tr>
 </table>
-- Example: `%SEARCH{"wiki" web="Main" scope="topic"}%`
+- Example: `%SEARCH{"wiki" web="%USERSWEB%" 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|Main/FormattedSearch]])_
 - %H% 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%" }%`
-- Related: [[METASEARCH|Main/WebHome#VarMETASEARCH]], [[TOPICLIST|Main/WebHome#VarTOPICLIST]], [[WEBLIST|Main/WebHome#VarWEBLIST]], [[FormattedSearch]], [[SearchHelp]], [[SearchPatternCookbook]], [[RegularExpression]]
+- Related: [[METASEARCH|Main/VarMETASEARCH]], [[TOPICLIST|Main/VarTOPICLIST]], [[WEBLIST|Main/VarWEBLIST]], [[FormattedSearch]], [[SearchHelp]], [[SearchPatternCookbook]], [[RegularExpression]]