Open topic with navigation

TIBCO® Patterns 6.1.2

# The Returned Scores

For each record, a set of scores is returned. For most applications, the "Match Score," also called the "Sort Score," is the only score that is needed. This is the overall match score for the record; it is the score that is used to sort the records when selecting the top-scoring records. As stated in the section Scoring Modes, there are several different scoring modes available. One of these is selected as the scoring mode for the top level querylet of the query tree. This becomes the "Match Score" for the query as a whole.

Some applications might need to access other scores as part of a post processing step. By default, the scores for all of the different scoring modes are returned. In addition, if the top level querylet is a score combiner, which is usually the case for most applications, the scores for each of the querylets of this top level combiner are returned. As with the overall scores, the scores for all of the different scoring modes are returned. Applications that have complex business rules based on the match strength of various components of the record can use these scores as input to these rules in post processing the returned records.

In some cases, the query might be a complex query with more than two levels. In this case, the querylet of interest might be several levels down in the query tree. By default, its score is not returned. Consider the example presented in the topic of Complex Queries. Suppose you have a business rule that states that records that are matched on the fax phone number should be treated differently than those that are matched on the home or cell phone number. By default, you do not have access to the match scores for the individual phone numbers as they are two levels down in the query tree. However, the match score for the phone number querylets can be obtained by assigning a name to the querylets. The match score for each named querylet is returned, allowing the application to determine which phone number was matched. Unlike the top levels, for named querylets, only the selected match score (also known as the sort score) is returned. See the individual API reference documents and the topic "Named Querylets" in the TIBCO Patterns Programmer's Guide for details on how to assign names to querylets and retrieve their scores.

Named querylets can provide a more convenient means of retrieving component scores even when they are at the top level. If query structures are built dynamically, the ordering of the different querylets might not be fixed. It can be more convenient to assign a name to the querylets of interest and retrieve the scores by name rather than by position.

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.