NotContainsWord method: SearchFilterGenerator class
Syntax
NotContainsWord(srch_field, word)
Description
Use the NotContainsWord method to generate a string filter that does not match strings containing the exact word or words. Words are separated by spaces and the logical and operator is implied; explicit logical operators are not supported between the words. This method forms the filter to find a match on all the words in the word parameter.
Note:
While the word parameter can include one or more words, this parameter is not equivalent to a phrase.
Parameters
| Parameter | Description |
|---|---|
|
srch_field |
Specifies the search field name as a string. |
|
word |
Specifies the exact word or words as a string. |
Returns
None.
Example
Consider a document that includes the following sentence:
Apples are tastier than oranges.
The following use of NotContainsWord will exclude this document.
&fg.NotContainsWord("LONG_TEXT", "apples oranges");
Related Topics