none
[openafs-wiki.git] / TWiki / SearchHelp.mdwn
1 # <a name="Search Help"></a><a name=" Search Help"></a> Search Help
2
3 <div>
4   <ul>
5     <li><a href="#Basic Search Form"> Basic Search Form</a></li>
6     <li><a href="#Advanced Search Form"> Advanced Search Form</a></li>
7     <li><a href="#Formatted Searches"> Formatted Searches</a></li>
8     <li><a href="#Search Preferences"> Search Preferences</a></li>
9   </ul>
10 </div>
11
12 ## <a name="Basic Search Form"></a> Basic Search Form
13
14 The [[WebSearch]] form offers basic search features:
15
16 - Search field: Enter one or more keywords
17 - All webs flag: Check the flag if you want to search all public webs, not just the current web
18 - Scope: Select if you want to search the topic title, text body or both
19
20 The search is keyword based like in a typical search engine:
21
22 - Specify word(s) you want to find
23 - Multiple words form an **AND** search, `intranet web service` returns all pages that have the three words anywhere in the page
24 - Optionally specify plus signs for **AND** search, like `intranet +web +service`
25 - Enclose words in double quotes to form a **literal search**, like `"web service"`
26 - Specify a minus sign to **exclude** a word, like `soap -shampoo`
27 - Use double quotes if you want to search for a leading minus sign, like `"-nowarn"`
28 - **Stop words** are excluded from a keyword search:
29   - Stop words are common words and characters such as `"how"` and `"where"`, defined in the SEARCHSTOPWORDS setting in the [[TWikiPreferences]]
30   - If you want to search for a word in the stop word list, prefix the word with a plus sign
31 - **Example:** To search for all topics that contain `"SOAP"`, `"WSDL"`, a literal `"web service"`, but not `"shampoo"`,%BR% enter this: `soap +wsdl "web service" -shampoo`
32
33 ## <a name="Advanced Search Form"></a> Advanced Search Form
34
35 The [[WebSearchAdvanced]] form offers more control over search.
36
37 TWiki supports three types of searches:
38
39 - `keyword`: The basic search type
40 - `literal`: Simple search where text is searched literally
41 - `regex`: A [[RegularExpression]] search for power users
42
43 TWiki's regex search is a set of regular expression patterns:
44
45 - Patterns are delimited by a semicolon
46 - An AND search is performed for the list of patterns
47 - An exclamation point preceeding a pattern indicates an AND NOT search; use it to exclude a pattern, like `!web service`
48 - If you want to search for a semicolon or an exclamation point, escape them with a leading backslash, like `\!shampoo`
49 - **Example:** To search for all topics that contain `"SOAP"`, `"WSDL"`, a literal `"web service"`, but not `"shampoo"`,%BR% enter this: `soap;wsdl;web service;!shampoo`
50
51 ## <a name="Formatted Searches"></a> Formatted Searches
52
53 You can embed a nicely [[formatted search|Main/FormattedSearch]] in a topic by using the `%SEARCH{}%` variable described in [[TWikiVariables]].
54
55 ## <a name="Search Preferences"></a> Search Preferences
56
57 The [[TWikiPreferences]] has these settings:
58
59 - `SEARCHDEFAULTTTYPE`: Default search type for search forms which calls the `search` script
60 - `SEARCHVARDEFAULTTYPE`: Default search type for `%SEARCH{}` variable
61 - `SEARCHSTOPWORDS`: List of stop words
62
63 -- TWiki:Main.PeterThoeny - 18 Jan 2004