Jump to: navigation, search

Screening Rule Operators

Operators

Operators are of two types:

  • Binary operators join two functions.
  • Unary operators operate on a single function.

  • && is the binary operator "and". For example,

        Find(“interest rate”) && Find(“APR”,false)

    matches a message only if it includes both "interest rate" and "APR."


    || is the binary operator "or." For example,

        Find(“station wagon”) || Find(“convertible”)

    matches any message that includes either "station wagon" or "convertible" (or "Station Wagon" or "station Wagon" or "Convertible").


    ! is the unary operator "not." For example,

        !Find(“windows”)

    matches any message that does not include the word "windows."


    You can combine ! with a binary operator. For example,

        Find(“bird”) && !Find(“goose”)

    matches any message that includes "bird" but does not include "goose."

    Operator Precedence

    p && q || r is parsed as (p && q) || r. For example, consider:

        Find(“debt”) && Find(“income”) || Find(“profit”)

    To paraphrase, this screening rule is basically “find X or find Y,” where X is "debt" and "income," and Y is "profit."
    It matches both "debt exceeds income" and "profits are fantastic".


    You can modify the default precedence by the explicit use of parentheses; for example:

        Find(“debt”) && (Find(“income”) || Find(“profit”))

    This screening rule is basically “find X and find Y,” where X is "debt" and Y is either "income" or "profit."

    It matches both "debt exceeds income" and "debts impact profit."
This page was last modified on December 17, 2013, at 11:54.

Feedback

Comment on this article:

blog comments powered by Disqus