Open topic with navigation

TIBCO® Patterns 6.1.2

# Score Types

A search computes several types of scores, each of which is appropriate for a separate problem domain. Score types are defined by the `lscore_t` enumerated type in the DevKit header.

By passing an LPAR_INT_SORTSCORE parameter at search time, you can select which type of score is used for ranking records.

Score types include the following:

LKT_SCORE_NORMAL | This is the default search which looks for the query text inside the record text. The presence of extra information in the record not found in the query does not penalize the record score. Use this score type for a substring or keyword search.
LKT_SCORE_SYMMETRIC | A symmetric search compares the full texts of both the query and record and evaluates their similarity. If the record contains information not present in the query, the score are lower than if that information had not been present. Use this score only when the query represents the entirety of the text expected to be found.
LKT_SCORE_REVERSE | A reverse search compares the full text of the record against the value of the query. This type of search looks for the record text inside the query text. The presence of extra information not found in the query does not penalize the record score. Possible uses for this type of search would be retrieving lists of standard keywords, locations or names embedded within a body of text.
LKT_SCORE_MIN | This is the minimum of the normal and reverse scores. In some situations when matching record to record this might be a better indicator of match quality than the symmetric score. This puts a higher penalty on extra data in either the record or the query than a symmetric search would. Note that as combining query expressions such as AND compute each score type independently the final minimum score might not be equal to either the final normal or reverse scores.
LKT_SCORE_MAX | This is the maximum of the normal and reverse scores. This is useful in the fairly rare situation where either the query or the record might be a subset of the other. Therefore you do not want to be penalized for extraneous data in either the record or the query. Examples might be when you are matching fields where there is a core set of relevant data in the field along with extra information that might or might not appear. Note that as combining query expressions such as AND compute each score type independently the final maximum score might not be equal to either the final normal or reverse scores.
LKT_SCORE_IT | scores the record using a special "information theoretic" method proprietary to TIBCO. The method should only be used if your TIBCO technical representative requires you to do so. Details on this scoring method can be provided at your request.

All six score types are computed and returned for each record and placed in lpars called LPAR_DBL_NORMMATCHSCORE, LPAR_DBL_SYMMATCHSCORE, LPAR_DBL_REVMATCHSCORE, LPAR_DBL_MINMATCHSCORE, LPAR_DBL_MAXMATCHSCORE and LPAR_DBL_ITMATCHSCORE respectively. In addition to these, the lpar LPAR_DBL_MATCHSCORE holds a copy of whichever match score was used to select and sort the records in the list.

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.