j  � ht://Dig: htsearch� � 0  

htsearch



W ht://Dig Copyright © 1995-2002 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. This may also include the wildcard '*'< which matches all documents, potentially as restricted or9 modified by other search fields. Other values are also< recognized but have 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

K This value is a pattern that specifies which URLs are to beI excluded from the search results. If a URL matches one ofH these patterns it is discarded. Multiple patterns can beH given, separated by a bar ("|"), or multiple definitions@ of the exclude input parameter can be given.
? The default is specified by the exclude4 attribute in the configuration file.

 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

K This value is a pattern that all URLs of the search resultsK will have to match. This can be used to restrict the searchK to a particular subtree or subsection of a bigger database.L Multiple patterns can be given, separated by a bar ("|"), orK multiple definitions of the restrict input parameter can beJ given. Any URL in the search results will have to match at0 least one of these patterns.
M Note that the restrict list does not take precedence over theL exclude list - if a URL matches patterns in both lists it is; still excluded from the search results.
? The default is specified by the restrict4 attribute in the configuration file.

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.

7 startyear, startmonth, startday,0 endyear, endmonth, endday

4 These values specify the allowed range of document3 modification dates allowed in the search results.) They can be used to restrict the search4 to particular "ages" of documents, new or old.
> The default is the full range of documents in the database.@ These values can also be specified by configuration attributes. of the same names in the configuration file.= If a negative number is given for any of these, it is taken0 as relative to the current year, month or day.


+Last modified: $Date: 2002/01/27 05:33:20 $ ÿÿ