Debian Codegraph @

htdoc/hts_form.html

raw
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
2 <html>
3 <head>
4 <title>
5 ht://Dig: htsearch
6 </title>
7 </head>
8 <body bgcolor="#eef7ff">
9 <h1>
10 htsearch
11 </h1>
12 <p>
13 ht://Dig Copyright &copy; 1995-2004 <a href="THANKS.html">The ht://Dig Group</a><br>
14 Please see the file <a href="COPYING">COPYING</a> for
15 license information.
16 </p>
17 <hr size="4" noshade>
18 <h2>
19 HTML Form
20 </h2>
21 <p>
22 The primary interface to htsearch is through an HTML form.
23 When the form is submitted, the htsearch program will take
24 values from the form and perform the actual search. The
25 search can be modified in many ways with either hidden input
26 fields or other HTML form tags. Study the examples to get a
27 feel of what things are possible.
28 </p>
29 <p>
30 The HTML form is expected to contain at least an input text
31 field named <strong>words</strong>. This is where the user will enter
32 the search words. Other values are also recognized but have
33 appropriate defaults in case they are not used:
34 </p>
35 <dl>
36 <dt>
37 </a>
38 <strong><a name="config">config</a></strong>
39 </dt>
40 <dd>
41 Specifies the name of the configuration file. The name here
42 is the name without the path and without the <em>.conf</em>
43 at the end. This file is assumed to be located in the
44 CONFIG_DIR directory. Periods are <strong>not</strong> allowed in this
45 field for security reasons (to prevent HTML authors from
46 pointing all around at your files).<br>
47 The default is <em>htdig</em>
48 </dd>
49 <dt>
50 <strong><a name="exclude">exclude</a></strong>
51 </dt>
52 <dd>
53 This value is a pattern that specifies which URLs are to be
54 excluded from the search results. If a URL matches one of
55 these patterns it is discarded. Multiple patterns can be
56 given, separated by a bar ("|"), or multiple definitions
57 of the exclude input parameter can be given. This pattern
58 may include regular expressions when enclosed within [ and ]
59 characters.<br>
60 The default is specified by the <a href="attrs.html#exclude">exclude</a>
61 attribute in the configuration file.
62
63 </dd>
64 <dt>
65 <strong><a name="format">format</a></strong>
66 </dt>
67 <dd>
68 This specifies the name of the template to display the
69 search results in. There are two builtin templates named
70 <em>builtin-long</em> and <i>builtin-short</i> which can be
71 used, but any number of custom templates can also be
72 defined. Find out more about the templates in the
73 <a href="hts_templates.html">Output Templates</a> section.<br>
74 The <em>format</em> value can be specified as either a
75 hidden input field or a drop down menu.<br>
76 The default is specified by the <a href="attrs.html#template_name">template_name</a>
77 attribute in the configuration file, and the template variable
78 is <a href="hts_template.html#SELECTED_FORMAT">SELECTED_FORMAT</a>.
79 </dd>
80 <dt>
81 <strong><a name="keywords">keywords</a></strong>
82 </dt>
83 <dd>
84 Used to specify a list of required words that have to be in
85 the documents. This list of words is added to the normal
86 <em>words</em> value using logical "and"s, or logical "or"s
87 if the <a href="attrs.html#any_keywords">any_keywords</a>
88 attribute is set to true in the configuration file.<br>
89 An example use for this value is to make it a drop down
90 menu with a limited set of predetermined categories or
91 keywords to restrict the search. This can be very useful
92 for very structured pages.
93 <br>Note that the words may appear anywhere in the document.
94 The scope of these required words is <strong>not</strong> limited to
95 words in META tags with the "keywords" or "htdig-keywords"
96 property, despite what the parameter name may suggest.<br>
97 The default is specified by the <a href="attrs.html#keywords">keywords</a>
98 attribute in the configuration file.
99 </dd>
100 <dt>
101 <strong><a name="matchesperpage">matchesperpage</a></strong>
102 </dt>
103 <dd>
104 Specifies how many matches will be displayed on each page
105 of results.<br>
106 The default is specified by the <a href="attrs.html#matches_per_page">matches_per_page</a>
107 attribute in the configuration file, and the template variable
108 is <a href="hts_templates.html#MATCHES_PER_PAGE">MATCHES_PER_PAGE</a>. Since this value has
109 to be a number, it either needs to be set using a hidden
110 input field or a with a drop down menu.
111 </dd>
112 <dt>
113 <strong><a name="method">method</a></strong>
114 </dt>
115 <dd>
116 This can be one of <em>and</em>, <i>or</i>, or <em>
117 boolean</em>. It determines what type of search will be
118 performed.<br>
119 The default is specified by the
120 <a href="attrs.html#match_method">match_method</a> attribute in
121 the configuration file and the template variable is
122 <a href="hts_templates.html#SELECTED_METHOD">SELECTED_METHOD</a>.
123 It is quite useful to make this item a drop down menu so the
124 user can select the type of search at search time.
125 </dd>
126 <dt>
127 <strong><a name="page">page</a></strong>
128 </dt>
129 <dd>
130 This should normally not be used. It is generated by the
131 paged results display.
132 </dd>
133 <dt>
134 <strong><a name="restrict">restrict</a></strong>
135 </dt>
136 <dd>
137 This value is a pattern that all URLs of the search results
138 will have to match. This can be used to restrict the search
139 to a particular subtree or subsection of a bigger database.
140 Multiple patterns can be given, separated by a bar ("|"), or
141 multiple definitions of the restrict input parameter can be
142 given. Any URL in the search results will have to match at
143 least one of these patterns. The pattern may include regular
144 expressions when the expression is enclosed by [ and ]
145 characters.<br>
146 Note that the restrict list does not take precedence over the
147 exclude list - if a URL matches patterns in both lists it is
148 still excluded from the search results.<br>
149 The default is specified by the <a href="attrs.html#restrict">restrict</a>
150 attribute in the configuration file.
151 </dd>
152 <dt>
153 <strong><a name="sort">sort</a></strong>
154 </dt>
155 <dd>
156 This can be one of <em>score</em>, <i>time</i>, <i>date</i>,
157 <em>title</em>, <i>revscore</i>, <i>revtime</i>, <i>revdate</i>,
158 or <em>revtitle</em>. It determines what type of sort will be
159 performed on the search results. The types <em>time</em> and
160 <em>date</em> are synonymous, as are <i>revtime</i> and
161 <em>revdate</em>, as all four sort on the time that the
162 documents were last modified, if this information is given
163 by the server.
164 The sort methods that begin with <em>rev</em> simply reverse
165 the order of the sort.<br>
166 The default is specified by the
167 <a href="attrs.html#sort">sort</a> attribute in the
168 configuration file, and the template variable is
169 <a href="hts_templates.html#SELECTED_SORT">SELECTED_SORT</a>.
170 It is quite useful to make this item a drop down menu so the
171 user can select the type of sort at search time.
172 </dd>
173 <dt>
174 <strong><a name="startyear">startyear</a></strong>, <strong>startmonth</strong>, <strong>startday</strong>,
175 <strong>endyear</strong>, <strong>endmonth</strong>, <strong>endday</strong>
176 </dt>
177 <dd>
178 These values specify the allowed range of document
179 modification dates allowed in the search results.
180 They can be used to restrict the search
181 to particular "ages" of documents, new or old.<br>
182 If the year is specified by two digits (e.g. 02), then it
183 is assumed to be in the 1900s if it is in the range 70-99, and
184 in the 2000s if it is in the range 00-69. If the year is not
185 specified, the search does <strong>not</strong> exclude
186 documents outside the range of dates within the year. Thus
187 it is impossible, for example, to restrict a search to
188 documents dated "December".<br>
189 Incompletely specified end dates are interpreted as follows:<br>
190 <table>
191 <tr><th>Date</th> <th>Becomes</th></tr>
192 <tr><td>04-31</td> <td>04-31- end of time</td></tr>
193 <tr><td>05-1999</td><td>05-31-1999</td></tr>
194 <tr><td>1999</td> <td>12-31-1999</td></tr>
195 </table><br>
196 The default is the full range of documents in the database.
197 These values can also be specified by configuration attributes
198 of the same names in the
199 <a href="attr.html#startyear">configuration file</a>.
200 If a negative number is given for any of these, it is taken
201 as relative to the current year, month or day.
202 </dd>
203 </dl>
204 <hr size="4" noshade>
205
206 Last modified: $Date: 2004/05/28 13:15:18 $
207
208 </body>
209 </html>