The Search Form

The search form generated by dtSearch Web Setup is a standard HTML form that you can edit in an HTML editor or cut and paste into other pages.   

Form Variables

dtSearch Web recognizes the following form elements:

Form Element

Meaning

cmd

A hidden form element that must have the value "search"

request

Search request

fileConditions

Optional additional search criteria based on a file's name, modification date, or size

booleanConditions

Optional additional boolean search criteria

searchType

Specifies the type of query syntax used in the request.  If present, must be one of: allwords, anywords, phrase (for exact phrases), bool.  

fuzziness

Level of fuzziness in a fuzzy search (0-9)

fuzzy

Enables fuzzy searching

index

Path to the index to search on the server

autoStopLimit

Search will automatically halt after this many documents have been found

maxFiles

Maximum number of files to retrieve (selects the best-matching files)

pageSize

Number of items to return per page of search results

phonic

Enables phonic searching

sort

Sorting method (name, hits, size, or date)

stemming

Enables stemming

synonyms

Enable synonym searching

userSynonyms

In synonym searches, use the user thesaurus

wordNetRelated

In synonym searches, use WordNet related words (antonyms, subcategories, etc.)

wordNetSynonyms

In synonym searches, use the WordNet synonyms

searchFlags

A numerical value with any combination of the search flags in the dtSearch developer API.   For more information see: SearchFlags 

mc

Highlight hits using multiple colors

returnXml

Return search results as XML rather than HTML

 

If fileConditions and/or booleanConditions are included on the form, and are not blank, then they are combined with the user's search request.  All conditions included in a search must be satisfied by each document retrieved. 

Selecting Multiple Indexes

Using the standard dtSearch Web search form, your users can select multiple indexes to search by holding down the CTRL key and clicking on the index names.

You can also edit the search form to add a single option that would cover multiple indexes. In an HTML "Select" control, the options look like this:

<option value="something"> visible text

The "visible text" appears in the list of choices, and if it is selected, the value is what gets sent to the server. To add an option that includes more than one index, make the value a list of index paths, using the | character to separate each index path.  The visible text can be anything you want.   Example:

<option value="C:\indexes\first|c:\indexes\second|c:\indexes\third">Search all indexes

Sorting

If sort is not "size", "name", "date", or "hits", then dtSearch Web will assume that the sort key is a stored field and will use the dtsSortByField search flag.  Sort can be followed by a colon and a numerical value that will be combined with the sort type.  Example:  "subject:0x210002".  See Sorting Search Results for more information on sort flags.

hits
In a search that is sorted by hits, dtSearch will return up to maxFiles of the most relevant documents, organized into pages each with pageSize documents.  If pageSize is not specified in the search form, the maxFiles value will be used as the page size.

date
Sorting by date works like sorting by hits, except that the most recent documents are returned instead of the most relevant.

size, name, and custom fields
When sorting by criteria other than hits or date, dtSearch will return up to maxFiles of the most relevant files, organized into pages each with pageSize documents, with the entire results list sorted by the specified criteria.  For example, if the sort criterion is "size", pageSize is 10, and maxFiles is 100, dtSearch will find the 100 most relevant files (not the 100 largest), and will display them in pages of 10 documents, sorted by size.