Ephemeral Thesauri

As an alternative to passing an LPAR_STR_THESAURUSNAME argument specifying a thesaurus previously created with the lkt_create_thesaurus command an LPAR_LST_THESAURUS can be passed in the search options, in the LPAR_LST_SIMPLEQUERY or in the LPAR_LST_COGQUERY (but not in the old style LPAR_LST_QUERYLET). The LPAR_LST_THESAURUS should contain the two argument values, thesaurus_options and thesaurus_data, as passed to the lkt_create_thesaurus command. That is one element of the list is a generic list containing the thesaurus name and, optionally, type, match mode and character map. The second element of the list is another LPAR_LST_THESAURUS containing the thesaurus class data for the thesaurus.

A thesaurus so defined is created and exists only for the duration of the query, and is thus known as an ephemeral thesaurus. Although when defining ephemeral thesauri the thesaurus name is required the name is ignored. It is required only to maintain consistency with the format of the thesaurus definition for the command. Thus ephemeral thesauri might have the same name as thesauri created with the lkt_create_thesaurus command or even other ephemeral thesauri in the same query without danger of interfering with or overriding these definitions.

Ephemeral thesauri are intended for those cases where possible synonyms or term weightings for a query are generated dynamically based on the query contents and cannot be predefined for all possible queries. Although it is possible to create any size ephemeral thesaurus or even create them from a CSV file it is strongly recommended that they be limited to a few classes in size. Creating ephemeral thesauri from a CSV file is NOT recommended for obvious performance reasons.