FilterOperator
The comparison operator applied in a recommendation filter condition.
Declaration
string RecommendationFilterOperatorPossible Values
EQUALSExact match. The field value must equal the single filter value.
NOT_EQUALSInverse of
EQUALS. Excludes records where the field matches the filter value.INSet membership. The field value must match one of the values in the filter array.
CONTAINS_ANYFor list-type fields. The field list must contain at least one value from the filter array.
CONTAINS_ALLFor list-type fields. The field list must contain every value in the filter array.
LESS_THANNumeric or date comparison. The field value must be less than the filter value.
LESS_THAN_OR_EQUAL_TONumeric or date comparison. The field value must be less than or equal to the filter value.
GREATER_THANNumeric or date comparison. The field value must be greater than the filter value.
GREATER_THAN_OR_EQUAL_TONumeric or date comparison. The field value must be greater than or equal to the filter value.
BETWEENRange comparison. The field value must fall between the two values in the filter array (inclusive). Supply exactly two values.
STARTS_WITHString prefix match. The field value must begin with the filter value.
ENDS_WITHString suffix match. The field value must end with the filter value.
LIKEPattern match. Supports
%as a wildcard character.
Discussion
Use these operators in the operator field of a FilterCondition. Not all operators are valid for all field types. Applying an incompatible operator returns a 400 error with a validation detail identifying the invalid condition.
For example, here’s a BETWEEN filter on a campaign ID range:
{
"field": "campaignId",
"operator": "BETWEEN",
"value": [
"10000",
"20000"
]
}Endpoints that accept a RecommendationFilterCondition are Query Daily Budget Recommendations, Query Target CPA Recommendations, Query Target CPA Suggestion, Query Category Suggestions, Query Keyword Suggestions, and Query Phrase Suggestions.