KeywordGroupSearch Command

Use the KeywordGroupSearch command in a Logic Template, when used with the DefineKeywordGroup Command, allows the user to search a number of individual keyword indexes as though they were a single large index. The KeywordGroupSearch Command is used to locate records containing user identified words and phrases within any of the fields across which any of the indexes belonging to the keyword index group were created.

To execute a Search Keyword Index Group request, use the KeywordGroupSearch command with five arguments. The expression to be used in searching the keyword index group 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 second argument.

KeywordGroupSearch( grp, exp, def, pas, wt );

KeywordGroupSearch Arguments

Argument

Description

grp

The ID assigned to the keyword index group.

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 KeywordGroupSearch Dialog Box by selecting the Keyword Index->Index Group menu item under the Searching category of the Logic Template editor command menu.

Examples

Search keyword index group with ID 2 for records using the search expression contained in HTML variable "Search".

Command

Description

KeywordGroupSearch( 2, Search, or, 1, 0);

Use OR as the default connector within the search expression which is carried out in pass 1. Do not apply any weighting factor to the results.

KeywordGroupSearch( 2, Search, and, 1, 3);

Use AND as the default connector within the search expression which is carried out in pass 1. Apply a weighting factor of 3 to the results.

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

Use OR as the default connector within the search expression which is carried out in pass 2. Do not apply any weighting factor to the results.

__DO_STAR = TRUE;

IF ( Search )

Scratch = "*";

ELSE

Scratch = Search;

ENDIF

KeywordGroupSearch( 2, Scratch, and, 1, Weight);

Use AND as the default connector within the search expression which is carried out in pass 1. Use weighting value contained in HTML variable "Weight". If the search string is empty return everything without changing the search string.