setBoostMode method: SearchFilterGenerator class
Syntax
setBoostMode(mode)
Description
Use the setBoostMode method to specify the computation to be performed to determine the final boost score when two or more score boosts have been applied to individual search filters.
Parameters
| Parameter | Description |
|---|---|
|
mode |
Specifies the boost mode as a string value:
|
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.setBoostMode("ADD");
Rem &fg.setBoostModeSum(); /* Equivalent mode */
End-If;
Related Topics