Unify and manage your data

Comparison Operators

Learn about comparison operators, including exact, fuzzy, and others, that define attribute matching logic in rules.

Use comparison operators, such as exact and fuzzy, to refine matching logic in rules.

Note: The exact and fuzzy operators do not define the comparison logic. The comparator assigned to the attribute does. These operators work the same way for comparison, but they differ slightly in token generation.

A match rule contains several key elements. Its primary element is the comparison formula, which usually appears in JSON after the comparator and match token classes. Depending on the rule type you choose (automatic, suspect, <custom>, or relevance_based), the formula is a Boolean or arithmetic expression that defines how two match candidates are compared for similarity. The rule uses comparison operators and helper operators, such as Equals, In, And, Or, and Null Values, as key components of the expression. For more information, see Helper Operators.

A rule must have at least one comparison operator. There are six operators: exact, fuzzy, exactOrNull, exactOrAllNull, notExact, and multi.

Comparison operators

exact

This operator ensures a comparison returns true when the tested values match exactly as defined by the assigned comparator class.

Example: Exact match on FirstName

{
  "exact": [
    "configuration/entityTypes/Individual/attributes/FirstName"
  ]
}
fuzzy

The fuzzy operator indicates that the comparison for the attribute is considered true if any values being tested are similar, but not necessarily identical.

Example: Fuzzy match on LastName

{
  "fuzzy": [
    "configuration/entityTypes/Individual/attributes/LastName"
  ]
}
exactOrNull

The comparison on the attribute is considered true if:

  • Both attributes have values and pass the test for exact, or
  • One attribute has a value while the other does not, or
  • Both attributes have no values.

Example: exactOrNull match on MiddleName

{
  "exactOrNull": [
    "configuration/entityTypes/Individual/attributes/MiddleName"
  ]
}
exactOrAllNull

The comparison on the attribute is considered true if:

  • Both entities have values and pass the test for exact, or
  • Both entities have no values.

Example: exactOrAllNull match on NamePrefix

{
  "exactOrAllNull": [
    "configuration/entityTypes/Individual/attributes/NamePrefix"
  ]
}
notExact

The notExact operator negates the behavior of the exact operator while preserving the connection between nested attribute values. It ensures that a comparison returns true when the tested values do not match exactly, as defined by the assigned comparator class.

It lets you create match rules that detect when values differ without allowing incorrect cross-matching across nested attributes. It provides an inverse comparison to exact, which is useful when an exact mismatch should trigger a match condition. It works as follows:

  • If two attributes have the same value, the result is false.
  • If two attributes differ, the result is true.
  • If one attribute has a value while the other is empty, the result is true.
  • Nested attributes remain grouped together, which prevents incorrect cross-value permutations.

Example: notExact match on CustomerType

{
  "notExact": [
    "configuration/entityTypes/Individual/attributes/CustomerType"
  ]
}
multi

The multi operator considers more than one attribute when matching entities.

For example, your data might contain swapped values, such as a last name in the FirstName attribute and a first name in the LastName attribute. In this case, regular matching methods cannot reliably reconcile the entities. By assigning the CrossMultiComparator to the multi operator, the system generates permutations of the values in FirstName and LastName. This allows it to find matches even when one entity lists John Doe and the other lists Doe John.

Example: multi match on FirstName and LastName

{
  "multi": [
    {
      "uri": "configuration/entityTypes/Individual/attributes/MultiGroup1",
      "attributes": [
        "configuration/entityTypes/Individual/attributes/FirstName",
        "configuration/entityTypes/Individual/attributes/LastName"
      ]
    }
  ],
  "comparatorClasses": {
    "mapping": [
      {
        "attribute": "configuration/entityTypes/Individual/attributes/MultiGroup1",
        "class": "com.reltio.match.comparator.CrossMultiComparator"
      },
      {
        "attribute": "configuration/entityTypes/Individual/attributes/FirstName",
        "class": "com.reltio.match.comparator.BasicStringComparator"
      },
      {
        "attribute": "configuration/entityTypes/Individual/attributes/LastName",
        "class": "com.reltio.match.comparator.BasicStringComparator"
      }
    ]
  }
}

Token generation

Comparison operators guide how generated tokens are compared during matching.

The exactOrNull operator does not produce match tokens.

The exactOrAllNull operator does not produce tokens by default, which is usually the best option. However, if you're struggling to find suitable attributes for a tokenization schema, you can request token generation in your tenant configuration. For more information, see raise a support request.

The notExact operator does not produce match tokens.