KeywordSearch Command

Use the KeywordSearch command in a Logic Template to locate records containing user identified words or phrases within a specified field across which the index was created.

To execute a Search Keyword Index request, use the KeywordSearch command with six arguments. The expression to be used in searching the keyword index is loaded into an HTML variable by an HTML form or within the Logic Template. The HTML variable is, then, passed to the command as the third argument.

KeywordSearch( fc, idx, exp, def, pas, wt );

KeywordSearch Arguments

Argument

Description

fc

The function code defining how to merge results.( NONRESTRICTIVE, RESTRICTIVE )

idx

The keyword index to be searched.

exp

The name of the HTML variable containing the keyword expression to match.

def

The default boolean connector ( or, and )

pas

The pass during which the search is to be executed.

wt

The weighting value to apply to this search. The weighting value may be passed directly or within an HTML variable.

Access the KeywordSearch Dialog Box by selecting the Keyword Index->Keyword Index menu item under the Searching category of the Logic Template editor command menu.

Examples

Search keyword index named "Titles" for records using the search expression contained in HTML variable "Search".

Command

Description

KeywordSearch( RESTRICTIVE, Titles, Search, or, 1, 0);

Use OR as the default connector within the search expression, and AND results to the results of other searches within pass 1. Do not apply any weighting factor to the results.

KeywordSearch( RESTRICTIVE, Titles, Search, and, 1, 3);

Use AND as the default connector within the search expression, and AND results to the results of other searches within pass 1. Apply a weighting factor of 3 to the results.

KeywordSearch( NONRESTRICTIVE, Titles, Search, or, 2, 0);

Use OR as the default connector within the search expression, and OR results to the results of other searches within pass 2. Do not apply any weighting factor to the results.

IF ( Search )

KeywordSearch( NONRESTRICTIVE, Titles, Search, and, 1, Weight);

ENDIF

If the HTML variable "Search" is not empty, use AND as the default connector within the search expression, and OR results to the results of other searches within pass 1. Use weighting value contained in HTML variable "Weight". Do not perform the search if the HTML variable "Search" is empty.