--- title: Operators slug: o2gc0008 canonical_url: https://docs.coveo.com/en/o2gc0008/ collection: coveo-merchandising-hub source_format: adoc --- # Operators In the [Coveo Merchandising Hub (CMH)](https://docs.coveo.com/en/o5290573/), operators are essential for filtering products by specific attributes. Common operators can be used along with ranking rules and filter rules, while numerical operators are only available for attributes with numerical values, such as price. They enable merchandisers to refine product results based on criteria like price, ratings, or other characteristics, enhancing customer experiences and boosting sales through targeted curation. ## Common operators ### Is The **Is** operator identifies products where an attribute exactly matches a specified value. **Example** As a merchandiser, you want to create a filter rule for your listing page that will _include_ all products that belong to the Electronics category. You select the `ec_category` as an attribute, `is` as your operator and `Electronics` as the value. ### Is not The **Is not** operator identifies products where an attribute doesn't match a specified value. **Example** As a merchandiser, you want to create a filter rule for your listing page that will _include_ products other than those that belong to the Electronics category. You select the `ec_category` as an attribute, `is not` as your operator and `Electronics` as the value. ### Contains The **Contains** operator identifies products where a specific word or phrase is found within the full value of a given attribute. **Example** As a merchandiser, you want to promote all red products on a listing page for a specific promotional event. To do this, in the _Include_ action, you would select the `ec_colors` attribute, set the operator as _Contains_, and enter _Red_ as the value. This rule will then include all products whose `ec_color` attribute contains _Red_, such as _crimson red_ or _raspberry red_. ### Does not contain The **Does not contain** operator identifies products where a specified word or phrase isn't found within the value of a given attribute. **Example** As a merchandiser, you want to create a _boost_ rule based on the `ec_name` attribute word "wires," however you have a selection of "red wires" that shouldn't be boosted. You create a second attribute for `ec_name` that doesn't contain "red." ### Is defined The **Is defined** operator identifies whether a value has been assigned to a product attribute. **Example** Your catalog contains products with a base price under the field `ec_price` and a promotional price under the field `ec_promo_price`. You want to boost all products that have a promotional price attached to it. To do so, you select the `ec_promo_price` attribute and then select the **Is defined** operator, followed by your ranking boost strength. All products with a value defined in the `ec_promo_price` field will receive a boost in the search results. ### Is not defined The **Is not defined** operator identifies when a value for a product attribute hasn't been defined (is empty). **Example** For example, your catalog contains products with a base price under the field `ec_price` and a promotional price under the field `ec_promo_price`. You want all full price products to appear higher in the results list. To do so, you select the `ec_promo_price` attribute and then select the **Is not defined** operator, followed by your preferred boost amount. All products without a value defined in the `ec_promo_price` field will receive a boost in the search results. ## Numerical operators Numerical operators enable precise control over numerical product attributes such as price, stock, and ratings. Here's how each operator plays a role: ### Is greater than (>) The **Is greater than** operator identifies product where a numerical attribute is higher than the value entered. **Example** You want to _exclude_ products whose price is more than 100$. ### Is less than (<) The **Is less than** operator identifies product where a numerical attribute is lower than the value entered. **Example** You want to _include_ products whose price is less than 25$. ### Is greater than or equal to (≥) The **Is greater than or equal to** operator identifies product where a numerical attribute is higher than, or equal to the value entered. **Example** You want to _exclude_ products whose price is 100$ and above. ### Is less than or equal to (≤) The **Is less than or equal to** operator identifies product where a numerical attribute is lower than, or equal to the value entered. **Example** You want to _include_ products whose price is 25$ or less.