j  � ht://Dig: htsearch� �  

htsearch



= ht://Dig Copyright © 1995-2000 The ht://Dig Group
8 Please see the file COPYING for license information.




HTML Form



= The primary interface to htsearch is through an HTML form.= When the form is submitted, the htsearch program will take: values from the form and perform the actual search. The? search can be modified in many ways with either hidden input> fields or other HTML form tags. Study the examples to get a$ feel of what things are possible.



> The HTML form is expected to contain at least an input text> field named words. This is where the user will enter> the search words. Other values are also recognized but have2 appropriate defaults in case they are not used:



 config

= Specifies the name of the configuration file. The name here; is the name without the path and without the .conf7 at the end. This file is assumed to be located in the> CONFIG_DIR directory. Periods are not allowed in this: field for security reasons (to prevent HTML authors from) pointing all around at your files).
 The default is htdig

 exclude

= This value is a pattern that all URLs of the search results cannot match.
 The default is blank.

 format

8 This specifies the name of the template to display the: search results in. There are two builtin templates named; builtin-long and builtin-short which can be6 used, but any number of custom templates can also be3 defined. Find out more about the templates in the@ Output Templates section.
7 The format value can be specified as either a- hidden input field or a drop down menu.
7 The default is specified by the template_name& attribute in the configuration file.

 keywords

= Used to specify a list of required words that have to be in: the documents. This list of words is added to the normal. words value using logical "and"s.
: An example use for this value is to make it a drop down8 menu with a limited set of predetermined categories or: keywords to restrict the search. This can be very useful for very structured pages.>
Note that the words may appear anywhere in the document.< The scope of these required words is not limited to< words in META tags with the "keywords" or "htdig-keywords"8 property, despite what the parameter name may suggest.

 matchesperpage

; Specifies how many matches will be displayed on each page of results.
: The default is specified by the matches_per_page; attribute in the configuration file. Since this value has: to be a number, it either needs to be set using a hidden) input field or a with a drop down menu.

 method

2 This can be one of and, or, or 8 boolean. It determines what type of search will be performed.
6 The default is specified by the match_method< attribute in the configuration file. It is quite useful to< make this item a drop down menu so the user can select the type of search at search time.

page

: This should normally not be used. It is generated by the paged results display.

 restrict

= This value is a pattern that all URLs of the search results= will have to match. This can be used to restrict the search3 to a particular subtree or subsection of a bigger database.
 The default is blank.

sort

< This can be one of score, time, date,@ title, revscore, revtime, revdate,= or revtitle. It determines what type of sort will be< performed on the search results. The types time and7 date are synonymous, as are revtime and7 revdate, as all four sort on the time that the< documents were last modified, if this information is given by the server.< The sort methods that begin with rev simply reverse the order of the sort.
. The default is specified by the sort< attribute in the configuration file. It is quite useful to< make this item a drop down menu so the user can select the type of sort at search time.


I Andrew Scherpbier <andrew@contigo.com>
+Last modified: $Date: 2000/02/17 22:05:21 $ ÿÿ