Open topic with navigation

TIBCO® Patterns 6.1.2

# Attributes Query

An attributes query is a comparison of a set of input query strings against a set of attribute values. This query is analogous to an AND of simple queries, each simple query being a comparison of one value against one attribute. It is provided as a shortcut convenience when querying a set of Variable Attributes. Instead of needing to construct a simple query for each attribute and then an AND score combiner for the simple queries you need to supply only the list of values and the list of attribute names to build a single query.

By default if an attribute doesn't exist in a record, or is empty (has zero length value) it is ignored. This can be changed by setting the empty score option: LKT_DBL_EMPTY_DATA_SCORE. If the empty score is set instead of being ignored the match of this attribute is considered to have the given score. For example consider a query against 2 attributes color and size. Suppose one record has a perfect match on size but does not have an attribute named color. By default this record would get a score of 1.0 because the non-existent attribute is ignored, so effectively the query is only against the perfectly matching size attribute. If the empty score is set to 0.2 then this record would get a score of (1.0 + 0.2) / 2 = 0.6 (assuming field weights were both the default 1.0).

| • | LPAR_BLKARR_SEARCHQUERY specifies the query strings to be matched by the attribute values.

| • | LPAR_STRARR_ATTRNAMES selects the attributes to be matched. Note that these values are just the attribute name, not a full field name with attribute qualifier. The length of this array must be the same as the length of the LPAR_BLKARR_SEARCHQUERY array. There is a one to one correspondence with each search query value being matched against the attribute with the name in the corresponding location in this array. Note there is no requirement that attribute names be unique. The same attribute might be matched by different search query values.

| • | LPAR_DBLARR_QFIELDWEIGHTS (optional) specifies the weight for matched text against each attribute in the LPAR_STRARR_ATTRNAMES array. The weight must be between 0.0 and 1.0 inclusive. Note that these are relative weights, as in the cognate query, not penalizing weights as in the simple query.

| • | LPAR_DBL_EMPTY_DATA_SCORE (optional) this sets the score assigned to empty or non-existent attributes. See discussion above.

| • | 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 this query. It applies to all attributes and query values listed. If LPAR_STR_THESAURUSNAME is specified LPAR_LST_THESAURUS might not be.

| • | LPAR_LST_THESAURUS (optional) defines a thesaurus to use for this query. It applies to all attributes and query values listed. 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 server 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 (e.g. 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_LST_QOPTS (optional) is a list of detailed tuning parameters which control how the TIBCO Patterns server 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_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.