Manual Bulk Matching

Manual Bulk Matching is sometimes required by the system:

  • After you have loaded data with auto-matching disabled
  • Match rules have changed that would cause a looser match
  • In the testing phase when the system is tweaked for performance.

To perform a manual match, from the monsterDB console, you can run a statement to perform this function.

Remember the collection in the monsterDB is equivalent to the domain/context in Custodian and the records within the collection are marked with an attribute “Table” that shows what type of table in custodian they belong to.

1. Rematch all records in the nodes collection:

db.nodes.aggregate([{'$rematch': {}}])

2. Rematch a selection of Records in the person collection

db.person.aggregate([ {'$match': {'Address.Country': 'USA'}} , {'$rematch': {}}]) 

3. Rematch all the Supplier table records of the company collection and return the count[ {'$match': {"Table": "Supplier"}} , {'$rematch': {}}]).count()


The “$match” statement is a filter for the collection ie “where the value is USA”, you can use all the normal AND, OR, REGEX type methods to build up the filter.

The “$rematch” statement is the command to get the system to rematch the selection coming from the $match, or if $match is omitted it will work on the whole collection

Please also see the section on auto-match.