51
dtSearch Web Manual
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. See dtSearchApiRef.chm for
more information on search flags
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
dtSearchApiRef.chm 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.
14
61
Technical Information
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.
The options file
The option settings in dtsearch_options.html control the appearance of search results and
retrieved files, generation of the synopsis, logging, and other options.
Each setting is bracketed with HTML comments, like this:
<!-- $Begin DocHeader -->
%%Filename%% (%%HitCount%% hits)
<!-- $End -->
The text that appears between the $Begin and $End comments has to be valid HTML. Text that
is not between $Begin and $End comments is ignored, and can be used to insert explanatory
comments.
Template Settings
Because dtsearch_options.html is a valid HTML file, you can edit it directly in an HTML editor
to change the appearance of retrieved documents or search results. When editing the HTML, be
careful to keep the $Begin and $End comments around each option setting.
Setting
Purpose
DocHeader
Text displayed above each retrieved document
DocFooter
Text displayed below each retrieved document
DocScript
JavaScript inserted in each retrieved document to enable hit
navigation
ResultsHeader
Text displayed above each search results list
ResultsFooter
Text displayed below each search results list
ResultsScript
JavaScript inserted in each search results list to enable
navigation between documents.
BeforeHit
Text displayed before each hit in a document
AfterHit
Text displayed after each hit in a document
ResultsTableHeader
Top row of search results table (for column labels)
ResultsTableItem
Format of each item in the search results table
ResultsTableFooter
End of search results table (generally </table>)
In ResultsTableItem, the following symbols identify where document-related information is
displayed:
Symbol
Purpose
%%Hits%%
Hit count
%%PhraseCount%%
Hit count, counting a phrase as a single hit
%%HitsByWord%%
List each word or phrase found in the search and the
number of hits for each
%%Filename%%
Name of the retrieved document
15
58
dtSearch Web Manual
%%Synopsis%%
Brief snippet of text showing the first hits in the document
with a few words of context around each hit. See Synopsis
Settings, below.
%%Location%%
Path to the retrieved document
%%Date%%
Modification date of the document
%%SizeK%%
Size of the document in kilobytes
%%Size%%
Size of the document in bytes
%%Title%%
Text from the first few lines of the document, or the TITLE of
an HTML document
%%DirectLink%%
The string to be used for the HREF for an http: link to the
document without hits highlighted (to directly open a file over
a web connection)
%%HighlightLink%%
The string to be used for the HREF for a link to the
document with hits highlighted
%%LocalLink%%
The string to be used for the HREF for a link to the local
path to the document (for use with dtSearch Publish only)
%%ThisDocOrdinal%% Sequential number of this item in the search results list (1, 2,
3, ...)
The search results format can also include a string that tells dtSearch Web to include the search
form at the end of the search results list. This string is:
%%Include{%%SearchForm%%}%%
Link Types
ResultsTableItem usually will contain one or more links to open the retrieved document. In
these links, use %%DirectLink%%, %%HighlightLink%%, or %%LocalLink%% to specify the
type of link you want. For example:
<a href="%%HighlightLink%%">%%Filename%%</a>
This would produce a link with the name of the document in the link. When clicked, the
document would open with hits highlighted.
If you want to open the file without highlighting, to allow the native viewer for the file to open it,
use either %%DirectLink%% or %%LocalLink%%. %%DirectLink%% produces a link to the file
using http, and is appropriate for use over a web connection
(example: http://www.example.com/documents/sample.doc). %%LocalLink%% produces a
link to the location of the file on disk (example: c:\documents\sample.doc) and is appropriate
for use in dtSearch Publish or to give users on a LAN direct access to files.
Option Settings
The options file also contains settings that control searching behavior and the way links and file
information appear in search results.
Setting
Purpose
FieldWeights
Specify the weight for hits that occur in fields. Example:
:
subject:10, HtmlTitle:15
HtmlRemoveScripts
Disable JavaScript in retrieved HTML files
HtmlUseTitleAsName
Use the Title of HTML files as the filename
16
59
Technical Information
PdfUseTitleAsName
Use the Title of PDF files as the filename
MaxUrlSize
Maximum size of a URL to generate
MaxWordsToRetrieve Maximum number of words to match in a single search
MaxWordsMessage
Message to display when too many words matched
UnconvertedTypes
File types to display without conversion to HTML
NoFilesMessage
Message to display when no files are retrieved
HighlightHttpDocs
Highlight hits in documents indexed via HTTP (using the
dtSearch Spider)
HttpProxy
Proxy server to use to access web resources
SERVER_NAME
Server address for the dtSearch Web server in search
results. (Specify only if it is necessary to override the
automatically-detected server name.)
Synopsis Settings
The %%Synopsis%% symbol in search results represents a brief snippet of text including the
first hits in each document, with a few words of context around each hit. The settings below
provide options to customize how the synopsis is generated.
Performance
Generating a synopsis requires that dtSearch Web open the original document and scan through
it to extract the text around each hit, which can be a time-consuming operation. To make
generation of a synopsis faster, enabling caching of text when you create the index of the
documents. For more information on this option, see "Caching Text" in the dtSearch Desktop
help file.
Formatting
dtSearch Web will format the synopsis so it can be inserted into a search results table. Line
breaks, paragraph formatting, colors, and extra spacing will all be removed to produce a simple
snippet of text, with hits marked in bold.
Setting
Purpose
SynopsisMaxContextBlocks Number of blocks of context to include in the synopsis.
SynopsisContextHeader
Text to include in front of each block of context.
SynopsisWordsOfContext Number of words to include around each hit in the
synopsis.
SynopsisMaxWordsToRead Number of words in each document to scan looking for
blocks of context to include in the synopsis.
Log Settings
To enable logging in dtSearch Web, check the Log document access or Log searches
checkboxes in the File tab of the Form Builder dialog box. This will set up the search form for
default logging of search requests or document access. The options, like the options for
document display, are controlled by a list of templates that you can customize by editing the
generated options file.
Setting
Purpose
LogSearches
Set to 1 to enable logging of all search requests
LogDocumentAccess
Set to 1 to enable logging of document access
DocumentLogNameTemplate Template used to generate the filename for the
document access log
17
51
dtSearch Web Manual
DocumentLogItemTemplate Template used to generate a single entry in the
document access log
SearchLogNameTemplate Template used to generate the filename for the search
log
SearchLogItemTemplate
Template used to generate a single entry in the search
log
The two filename templates, DocumentLogNameTemplate and SearchLogNameTemplate, are
used to generate log filenames. By building date symbols into the log name, you can have a new
log file start every day, month, or year. Example:
c:\logs\SearchLog%%Year%%-%%Month%%.log
The two item templates, SearchLogItemTemplate and DocumentLogItemTemplate, are used to
generate the lines added to the log file. The following symbols can be used in the templates to
customize the content of the logs:
Symbol
Meaning
%%DateTime%%
The date and time of the search
%%Result%%
"OK" if the request succeeded, "DENIED" if access was
denied, "FAILED" on other errors
%%REMOTE_USER%% The value of the REMOTE_USER HTTP variable (unless
your site requires a login, it will be blank)
%%REMOTE_ADDR%% The value of the REMOTE_ADDR HTTP variable (the IP
address of the user accessing the site)
%%DocName%%
The name of the document accessed (document log only)
%%SearchRequest%%
The user's search request (search log only)
%%FileConditions%%
The value of the fileConditions form variable (search log
only)
%%BooleanConditions%% The value of the booleanConditions form variable (search
log only)
%%SearchIndex%%
The index (or indexes) searched (search log only)
%%DocCount%%
The number of documents retrieved (search log only)
%%Month%%
The month of the search (01-12)
%%Day%%
The day of the search (01-31)
%%Year%%
The year of the search (4-digit)
The log files are generated in CSV format, which you can import into Excel or most databases.
Virtual directories
When users access your web site through a web server, they do not see the same folders and files
that you would see in Explorer. Instead, they see "virtual" folders with names like "/Scripts" or
"/Docs" that you map to folders on your hard disk when you set up your web server.
18
Documents you may be interested
Documents you may be interested