Open topic with navigation

TIBCO® Patterns 6.1.2

# Simple Query

A simple query is a comparison of an input query string and one or more fields in the table. The TIBCO Patterns servers' intelligent string matching algorithm is used to score the comparison and tolerate errors.

This is the most common score generator and the TIBCO Patterns servers raison d'etre. A simple query is specified as a LPAR_LST_SIMPLEQUERY which contains the following parameters.

| • | LPAR_BLK_SEARCHQUERY specifies the query string to be used for this comparison.

| • | LPAR_INTARR_SELECTFLDS selects the record fields against which this querylet is compared. Fields are specified by number with this option. Note that it is impossible to reference a Variable Attribute value using field numbers.

| • | LPAR_STRARR_FIELDNAMES selects the record fields against which this querylet is compared. Fields are specified by name with this option. The field name might include a Variable Attribute qualifier (see Variable Attributes - Usage Details for details).

| • | LPAR_DBLARR_QFIELDWEIGHTS (optional) specifies the weight for matched text against each field in the LPAR_INTARR_SELECTFLDS or LPAR_STRARR_FIELDNAMES array. The maximum weight is 1.0, with values less than 1.0 representing penalized matches.

| • | LPAR_DBL_INVALID_DATA_SCORE (optional) is the score to return for a record if either a query or a record field has invalid data. This supersedes on a query by query basis the value set in the search parameters. There is no such thing as invalid text data so this pertains to custom date matching and predicate scorers only.

| • | LPAR_DBL_EMPTY_DATA_SCORE (optional) is the score to return for a record if either a query or a record field set is empty. This supersedes on a query by query basis the value set in the search parameters. If a Variable Attribute doesn't exist for a record it is considered to be empty.

| • | LPAR_BOOL_MATCH_EMPTY controls behavior when a query string and the data it is being matched to are both empty. If true, a 1.0 score is generated. If false, the empty-score is used.

Default: false

| • | LPAR_INT_SORTSCORE (optional) sets the score type that is considered to be the match score for this query. This supersedes on a query by query basis the value set in the search parameters.

| • | LPAR_STR_THESAURUSNAME (optional) is the thesaurus to use for just this querylet. If LPAR_STR_THESAURUSNAME is specified LPAR_LST_THESAURUS might not be.

| • | LPAR_LST_THESAURUS (optional) defines a thesaurus to use for just this querylet. If LPAR_LST_THESAURUS is specified LPAR_STR_THESAURUSNAME might not be. The list must consist of two lpars, they being the thesaurus_options and thesaurus_data arguments to the `lkt_create_thesaurus` command. The thesaurus defined by this argument is created and exists only for the duration of this query and is local to this query. See Thesaurus Matching for more information about defining a thesaurus and TIBCO Patterns servers' thesaurus support in general and Ephemeral Thesauri for more information on these ephemeral thesauri in particular.

| • | LPAR_DBL_THESAURUSWEIGHT (optional) is a penalty factor that is applied to every thesaurus substitution. This penalty factor is applied for all thesaurus types, but only if there was a thesaurus match between query and record of two different terms (for example, a match of Peggy to Margaret but it does not apply to a match of Peggy to Peggy). If a combined thesaurus is being used the penalty factor defined in the thesaurus for the class is multiplied by the factor provided here to obtain the final penalty factor.

| • | LPAR_STR_CHARMAP (optional) is the name of the character map to be applied to the query values. By default all fields referenced in a simple query must have the same character map. If a query is to be performed across fields that use two or more different character maps then this option must be supplied to specify which map is to be used.

Note: Setting LPAR_STR_CHARMAP option might result in invalid or incorrect results. Consult your TIBCO representative before using this option.

| • | LPAR_LST_QOPTS (optional) is a list of detailed tuning parameters which control how the TIBCO Patterns server's scores matches. It is extremely rare that any of these values need to be changed and should be changed only in consultation with your TIBCO representative.

| • | LPAR_INT_CUSTOMSCORE (optional) specifies which custom score function to use for this comparison. The currently defined values for this parameter are:

| — | LKT_CS_NONE specifies that no custom scoring is to be applied. This is the default.

| — | LKT_CS_DATE_DEDUP specifies that a special date comparison scoring method should be used. This is tuned for detecting likely transformations or incomplete entries for dates. If this custom scoring method is specified the field list for this query must consist of exactly one field and that field must have a field type of LKT_FLD_TYPE_DATE. See The TIBCO Patterns Table for an explanation of field types.

| • | LPAR_STR_QLETGROUP (optional) assigns a group name to this querylet. Group names are used by the GIP prefilter to improve the selection of child records in joined searches. See the "Matching Compound Records and Querylet Grouping” section in the TIBCO® Patterns Concepts Guide for more information on querylet grouping and when to use it.

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO® Patterns

Copyright © 2010-2025. Cloud Software Group, Inc. All Rights Reserved.