Filter operators

Operators define the conditions inside a filter. For example, equals, greater than, or is true. They work in both customer and event filters. All operators are case-insensitive.

String operator dropdown showing equals, contains, starts with, and matches regexp options.

Available string operators in a Bloomreach filter.

You can compare against a static value or against another attribute using the π button.

Compare a filter value to a static input or to another attribute..

Compare a filter value to a static input or to another attribute.

Special operators

OperatorBehavior
is setTrue if the attribute has any value, including an empty string.
is not setTrue if the attribute has no value at all (null).
has valueTrue if the attribute has a non-empty value (string length > 0).
has no valueTrue if the attribute is empty or null.

String operators

OperatorBehavior
equalsExact match to the specified string.
does not equalMust be set, but different from the specified string.
inMust match one value from a list. Maximum 5,000 values.
not inMust be set, but different from all values in a list. Maximum 5,000 values.
containsThe specified value must appear within the attribute.
does not containThe specified value must not appear within the attribute.
starts withMust match the opening characters of the string.
ends withMust match the closing characters of the string.
matches regexpMust match a regular expression. Uses RE2 syntax. Not case-sensitive by default — use the (?-i) flag to enable case sensitivity, for example (?-i)._[a-z].

📘

List data types

When filtering a list attribute using all_items, empty lists will match because "all items equal X" evaluates as true for an empty list. To exclude empty lists, add a has value condition.

Number operators

OperatorBehavior
equalsExact numeric match.
in betweenIncludes both boundary values.
less thanExcludes the boundary value itself.
more thanExcludes the boundary value itself.

🚧

Important

If one segment uses age is less than 18 and another uses age is more than 18, customers who are exactly 18 fall into neither segment. Use in between carefully for the same reason—if you define 0–50 and 50–100, the value 50 appears in both segments.

Boolean operators

Boolean operators match true/false values and also 1/0. Attributes with no value or a different value type won't match either operator.

  • is true
  • is false

Date operators

These operators compare attributes in the date format to the current time. To better understand how to work with these operators, see the examples section.

more thanA relative time period further in the past or future than the specified distance.
less thanA relative time period closer in the past or future than the specified distance.
matches rangeAny date within a specified absolute date range.
matches current dayDay of the month matches the current day.
matches current monthMonth matches the current month.
matches current yearYear matches the current year.
second matchesEvent occurred in a given second of a minute (1–60).
minute matchesEvent occurred in a given minute of an hour (1–60).
hour matchesEvent occurred in a given hour of a day (1–24).
weekday matchesEvent occurred on a given day of the week (1–7, where 1 = Monday).
day matchesEvent occurred on a given day of the month (1–31).
month matchesEvent occurred in a given month (1–12).
year matchesEvent occurred in a given year (enter the full year, for example 2019).

Supported operators for catalogs: more than, less than, matches range, matches current year.

Supported time formats: UNIX timestamp, Y-M-D, D-M-Y, M/D/Y, D.M.Y — with optional H:M or H:M:S.

List operators

List operators extend any standard operator with a scope condition: whether all items in the list must meet the condition, or whether at least one item must meet it.

List operator scope options showing all items and at least one item choices.

List operator scope options — all items or at least one item.