setBoostModeSum method: SearchFilterGenerator class

Syntax

setBoostModeSum()

Description

Use the setBoostModeSum method to set the computed boost to the sum of all of the matches.

Parameters

None.

Returns

None.

Example

In the following example, if there is a match for both filters, then the score would be boosted by 5 points, which is the sum of the score boosts; otherwise, if just one filter is matched, then the score is boosted by that match alone:

If &fg.MatchAnyReturnTrue() Then
   &fg.ContainsWord("DEPTNAME", "support");
   &fg.BoostFilterScore(0.02);
   &fg.ContainsWord("QE_STATUS", "open");
   &fg.BoostFilterScore(0.03);
   &fg.EndMatchAny();
   &fg.setBoostModeSum();
   Rem &fg.setBoostMode("ADD"); /* Equivalent mode */
End-If;