ContainsKeyWords method: SearchFilterGenerator class
Syntax
ContainsKeyWords(srch_field, words)
Description
Use the ContainsKeyWords method to generate a string filter that matches strings. Unlike the ContainsWord method, this method allows to supply logical operator (& or |) to separate words within the words parameter. If no operator is specified, then the default & operator is used.
Important:
This method cannot be used in conjunction with any of the score boosting methods.
Parameters
| Parameter | Description |
|---|---|
|
srch_field |
Specifies the search field name as a string. |
|
words |
Specifies the keywords as a string. |
Returns
None.
Example
In the following example, the search filter returns results that match either apples or oranges:
&SFG.ContainsKeyWords(&sAttrName," apples | oranges");
In the following example, the search filter returns results that match both apples and oranges:
&SFG.ContainsKeyWords(&sAttrName," apples & oranges");
Related Topics