data/TWiki/TWikiUISearchDotPm.txt
changeset 0 414e01d06fd5
equal deleted inserted replaced
-1:000000000000 0:414e01d06fd5
       
     1 ---+ Package =TWiki::UI::Search=
       
     2 
       
     3 UI functions for searching.
       
     4 
       
     5 
       
     6 %TOC%
       
     7 
       
     8 ---++ StaticMethod *search* <tt>($session)</tt>
       
     9 
       
    10 Perform a search as dictated by CGI parameters:
       
    11 
       
    12 | *Parameter:* | *Description:* | *Default:* |
       
    13 | ="text"= | Search term. Is a keyword search, literal search or regular expression search, depending on the =type= parameter. SearchHelp has more | required |
       
    14 | =search="text"= | (Alternative to above) | N/A |
       
    15 | =web="Name"= <br /> =web="%USERSWEB%, Know"= <br /> =web="all"= | Comma-separated list of webs to search. The special word =all= means all webs that doe *not* have the =NOSEARCHALL= variable set to =on= in their %WEBPREFSTOPIC%. You can specifically *exclude* webs from an =all= search using a minus sign - for example, =web="all,-Secretweb"=. | Current web |
       
    16 | =topic="%WEBPREFSTOPIC%"= <br /> =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 |
       
    17 | =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. | None |
       
    18 | =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%) |
       
    19 | =scope="topic"= <br /> =scope="text"= <br /> =scope="all"= | Search topic name (title); the text (body) of topic; or all (both) | ="text"= |
       
    20 | =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; in case you want to sort across webs, create a [[FormattedSearch][formatted]] table and sort it with TablePlugin's initsort | Sort by topic name |
       
    21 | =limit="all"= <br /> =limit="16"= | Limit the number of results returned. This is done after sorting if =order= is specified | All results |
       
    22 | =date="..."= | limits the results to those pages with latest edit time in the given TimeInterval.  | All results |
       
    23 | =reverse="on"= | Reverse the direction of the search | Ascending search |
       
    24 | =casesensitive="on"= | Case sensitive search | Ignore case |
       
    25 | =bookview="on"= | BookView search, e.g. show complete topic text | Show topic summary |
       
    26 | =nonoise="on"= | Shorthand for =nosummary="on" nosearch="on" nototal="on" zeroresults="off" noheader="on" noempty="on"= | Off |
       
    27 | =nosummary="on"= | Show topic title only | Show topic summary |
       
    28 | =nosearch="on"= | Suppress search string | Show search string |
       
    29 | =noheader="on"= | Suppress search header <br /> <span style='background: #FFB0B0;'> *Topics: Changed: By:* </span> | Show search header |
       
    30 | =nototal="on"= | Do not show number of topics found | Show number |
       
    31 | =zeroresults="off"= | Suppress all output if there are no hits | =zeroresults="on"=, displays: "Number of topics: 0" |
       
    32 | =noempty="on"= | Suppress results for webs that have no hits. | Show webs with no hits |
       
    33 | =header="..."= <br /> =format="..."= | Custom format results: see *[[FormattedSearch]]* for usage, variables &amp; examples | Results in table |
       
    34 | =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 |
       
    35 | =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 |
       
    36 | =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= |
       
    37 | =separator=", "= | Line separator between hits | Newline ="$n"= |
       
    38 
       
    39