How to add/remove/change a match rule?

Question

How to add/remove/change a match rule?

Answer

There are a few steps needs to be performed when we add a match rule or when there is a change in the match rule, here are below details.

Match Rule:

A match rule defines a set of attributes that should be used to compare two entities and the type of comparison used for each attribute. A match rule declares match token classes and comparator classes that support the strategy of the rule. It also defines if the match is a Deterministic or Probabilistic one.

Example match rule for HCP: https://documentation.reltio.com/matchmerge/exonesimplerule.html?hl=simple%2Cmatch%2Crule%2Cexample

Steps to add/remove Match rule:

Match rule is a part of L3 configuration and needs to be added under Match groups, here is the below steps to Get configuration and update the match rule:

1) Using the below API we can review the L3 configuration.

 GET: {{tenantURL}}/configuration//_noInheritance

We can add new match rules or we can remove/change existing match rule.   Here is an example of match rule - "Rule 12".

Example: we can change the match rule name or remove completely and add a new rule.

[
{
"matchGroups": [
{
"uri": "configuration/entityTypes/Company/matchGroups/Rule2",
"label": "Exact(ContractNumber)And Fuzzy(Name) - Rule 2",
"type": "suspect",
"useOvOnly": "true",
"rule": {
"matchTokenClass": "com.reltio.match.token.ExactMatchToken",
"matchTokenClasses": {
"mapping": [
{
"attribute": "configuration/entityTypes/Company/attributes/Name/attributes/Name",
"parameters": [
{
"parameter": "groups",
"values": [
{
"useNoiseIfEmpty": "true",
"classParams": {
"threshold": "50%",
"useStemmer": "true",
"useSoundex": "true"
},
"pattern": "\\w{2,}",
"className": "com.reltio.match.token.DistinctWordsMatchToken",
"noiseDictionary": "organizationName"
}
]
}
],
"class": "com.reltio.match.token.CustomMatchToken"
}
]
},
"comparatorClasses": {
"mapping": [
{
"attribute": "configuration/entityTypes/Company/attributes/Name/attributes/Name",
"parameters": [
{
"parameter": "groups",
"values": [
{
"useNoiseIfEmpty": "true",
"classParams": {
"threshold": "50%",
"useStemmer": "true",
"useSoundex": "true"
},
"pattern": "\\w{2,}",
"className": "com.reltio.match.comparator.DistinctWordsComparator",
"noiseDictionary": "organizationName"
}
]
}
],
"class": "com.reltio.match.comparator.CustomComparator"
}
]
},
"and": {
"exact": [
"configuration/entityTypes/Company/attributes/ContractNumber/attributes/Number"
],
"equals": [
{
"value": "Reporting Name",
"values": [
"Reporting Name"
],
"uri": "configuration/entityTypes/Company/attributes/Name/attributes/Type"
}
],
"fuzzy": [
"configuration/entityTypes/Company/attributes/Name/attributes/Name"
],
"ignoreInToken": [
"configuration/entityTypes/Company/attributes/Name/attributes/Name",
"configuration/entityTypes/Company/attributes/Name/attributes/Type"
]
}
},
"matchServiceClass": "com.reltio.businesslogic.match.providers.internal.InternalMatchService",
"scoreStandalone": 0,
"scoreIncremental": 0
}
]
}
]

2) After adding/changing/removing match rule, we need to PUT the configuration back using the below API.

PUT:{{tenantURL}}/configuration

 Procedure to add a match rule:

 The below steps needs to be taken care while adding Match rule in L3:

  1. Add Match rule in L3 configuration. (please refer Steps to add/Remove Match rule for the detail steps)
  2. After adding match rule in tenant L3 configuration, we need to check whether “MatchingStrategy”  is enabled in physical tenant configuration

(As mentioned above, “MatchingStrategy”  is configured in physical tenant configuration and it can only be updated by the Reltio Support team.  This requires you to create Reltio support ticket to enable/disable MatchingStrategy)

     3The “MatchingStrategy” needs to set as “INCREMENTAL”.
     4. 
Rebuild match table task that needs to be performed. This task helps to rematch the entities. Please note, it will not clear the match tables, it just updates it to remove old info and adds a new one.

Documentation link: https://documentation.reltio.com/tasksapi/RebuildMatchTableTask.html?hl=rebuild,match,table

 

Procedure to Remove Match rule:

The below actions need to take for removing match rule:

  1. Remove the match rule from L3. (please refer Steps to add/Remove Match rule for the detail steps)
  2. We need to truncate Match Table and this task helps to clean match tables ( currently it can only be done by Reltio team so Please create Reltio support ticket for truncate match table)
  3. Execute the Rebuild match table task to rematch the entities. (Also, double-check whether the matching is enabled before start rebuild match table task)

Please note, the merged records will not be split after removing the “Automatic” match rule from the L3 Configuration.

But the Matched records will be updated after removing the “suspect” Match rule from the L3 configuration.

The Suspect rule means that if the rule comparing the entities evaluates to true, the entities should be considered as “potential match”, making the pair available for visual review where a data steward can decide to merge the entities, leave the entities unmerged, or explicitly declare they are not a match.

 

Procedure to Change Match rule:

The below actions need to take for updating match rule:

  1. Change the match rule in L3 (please refer Steps to add/Remove Match rule above)
  2. Execute the Rebuild match table task to rematch the entities.
  3. Double-check whether the matching is enabled before start rebuild match table task

We can truncate the match tables and perform the Rebuild match table task. (This is recommended speed-up the re-matching)

Please note, the merged records will not be updated after changing “Automatic” to “Suspect” match rule in the L3 Configuration.

The below tasks also can be performed for adding/removing/updating match rules if required.

1. Cassandra Matches Consistency Task:

This task detecting/fixing some inconsistency cases between main data storage and matching storage. It can be run in cases when we want to check consistency and/or fix already identified inconsistencies.

Documentation link:https://documentation.reltio.com/tasksapi/cassandramatchescontask.html?hl=cassandra%2Cmatches 

2.Potential Matches Reindex Task:

This task cleans potential matches info in the ES and reindexes from scratch using match tables. The only case to run is when it is detected an inconsistency in potential matches counters.

https://documentation.reltio.com/tasksapi/PotentialMatchesReindexTask.html?hl=potential%2Cmatch%2CreindexDocumentation Link: 

References:

https://documentation.reltio.com/tasksapi/RebuildMatchTableTask.html?hl=rebuild,match,table

https://documentation.reltio.com/tasksapi/cassandramatchescontask.html?hl=cassandra%2Cmatches 

https://documentation.reltio.com/tasksapi/PotentialMatchesReindexTask.html?hl=potential%2Cmatch%2CreindexDocumentation Link

https://documentation.reltio.com/matchmerge/exonesimplerule.html?hl=simple%2Cmatch%2Crule%2Cexample

 

 

 

Was this article helpful?
0 out of 1 found this helpful

Comments

0 comments

Please sign in to leave a comment.