Using a Thesaurus in a Search

To use a thesaurus in a search, simply pass an LPAR_STR_THESAURUSNAME as one of the search parameters (using the srchpars argument to lkt_dbsearch). A different thesaurus can be specified per querylet by adding an LPAR_STR_THESAURUSNAME to each LPAR_LST_SIMPLEQUERY, LPAR_LST_COGQUERY or LPAR_LST_QUERYLET. If a thesaurus is specified in both places the thesaurus specified in the query specification is used.

Each thesaurus must exist on the same server as the database.

To set the penalty factor of a substitution thesaurus match, pass an LPAR_DBL_THESAURUSWEIGHT as a search parameter. It might also be added to the parameters list for simple, cognate and attributes queries to set the penalty for individual querylets. If set in both places the value on the individual querylet takes precedence.