Tie-breaking Rules
Besides dynamic cutoff methods, TIBCO Patterns - Search also provides optional tie-breaking rules that allow you to control the ordering of the results list in the event that multiple records receive identical scores.
You specify tie-breaking rules in an ordered list. When a group of records receives the same score, the first rule in the list is applied. If the application of this rule also results in a tie between two or more records, the second rule in the list is applied, and so on. If two or more records remain tied when all tie-breaking rules are exhausted, the order of these records is undefined.
The available tie-breaking rules include the following:
| • | Scoring Mode – Ties are broken based on a particular type of scoring mode, which should be other than the primary scoring mode(s) specified for the search. For instance, when the primary scoring mode is normal scores, a common practice is to break normal-score ties using the symmetric scores for the records involved. The effect is that, when the query partially matches a set of records with identical normal scores, records with less unmatched text are ordered ahead of records with more unmatched text. |
| • | Field value – Ties are broken based on comparing the value of a specified field in the tied records. If a text field is specified for tie-breaking, the resultant ordering is “alphabetical” sorted lowest to highest based on Unicode code point values, local lexical ordering is not used. If the specified field is numeric, the resultant ordering is by decreasing values (that is, greatest first). |
| • | Match alignment – Ties are broken in favor of records where most of the matching text occurs closer to the beginning of the field. (This rule is meaningful only for the simple and cognate query types, not for date comparisons or predicate queries.) |
| • | Record key - Ties are broken according to the ascending sort order of the record key. As all keys must be unique, this is guaranteed to break a tie. Use this tie-breaking rule as the final rule in a list of tie-breaking rules whenever you want the search results to be presented in a deterministic order. |
If you do not specify a set of tie-breaking rules, a default set is employed consisting of: tie-breaking by symmetric score, followed by tie-breaking by record key.