You can configure the match engine by specifying the match engine to use and configuring the predefined comparison functions. You only need to specify the match engine to use if you are using an engine other than the Sun Match Engine.
Perform any of these steps to configure the match engine:
Sun Master Index can support different match engines depending on the adapter configured to communicate with the engine. Default classes are provided for using the Sun Match Engine. You can implement a custom match engine along with custom adapters. The match engine configuration is defined by the matcher-api and matcher-config elements.
The default adapters for the Sun Match Engine are com.stc.eindex.matching.adapter.SbmeMatcherAdapter and com.stc.eindex.matching.adapter.SbmeMatcherAdapterConfig.
In the Projects window, expand the Configuration node in the project you want to modify, and then double-click the Match Field file.
The file opens in the NetBeans XML editor.
Scroll to the matcher-api element in the MatchingConfig section.
Specify the Java class for the matching adapter to use, using the fully qualified class name as shown below.
<matcher-api> <class-name>com.stc.eindex.matching.adapter.SbmeMatcherAdapter </class-name> </matcher-api> |
In the matcher-config element, specify the Java class for the configuration of the matching adapter, using the fully qualified class name as shown below.
<matcher-config> <class-name> com.stc.eindex.matching.adapter.SbmeMatcherAdapterConfig </class-name> </matcher-config> |
Save and close the file.
The match configuration file in the Match Engine node of the master index project lists and defines the configuration for each match type based on the predefined comparison function for the Sun Match Engine. These match types can be applied to each field in the match string. You can modify the configuration of the existing matches types, add new match types, and specify whether the match engine should use agreement and disagreement weights or m-probabilities and u-probabilities.
For more information about the structure of the match configuration file and the comparison functions you can use, see Understanding the Sun Match Engine.
In the Projects window, right-click the master index application you want to modify, and then click Open.
If the Configuration Editor dialog box appears, click Edit to check out the listed files.
The Configuration Editor appears.
Click the Matching tab.
The Matching page appears with a list of fields defined for matching and a list of comparators that you can modify.
In the Probability Type field, select one of the following:
Use Agree/Disagreement Weight Ranges – Uses agreement and disagreement weights for matching. If agreement and disagreement weights are used, the m-probability and u-probability fields are ignored and do not appear on the Matching page.
Use M-Probabilities/U-Probabilities – Uses m-probabilities and u-probabilities for matching. If m-probabilities and u-probabilities are used, the agreement and disagreement weight fields are ignored and do not appear on the page.
Click Add in the lower right portion of the window.
The Edit Matching Rules dialog box appears.
Fill in the fields described in Match Comparator Configuration Properties for Sun Master Index (Repository).
Click OK.
To edit an existing matching rule:
Click Edit in the lower right portion of the window.
The Edit Matching Rules dialog box appears.
Change the value of any of the fields described in Match Comparator Configuration Properties for Sun Master Index (Repository).
Click OK.
To remove an existing matching rule:
On the Configuration Editor toolbar, click Save.
In the project window, expand the master index project, and then expand the master index application.
In the Match Engine folder, double-click matchConfigFile.cfg.
For the Probability Type, enter one of the following values:
0 – Uses m-probabilities and u-probabilities for matching. If m-probabilities and u-probabilities are used, the agreement and disagreement weight fields are ignored.
1 – Uses agreement and disagreement weights for matching. If agreement and disagreement weights are used, the m-probability and u-probability fields are ignored.
For each comparison function you want to configure, modify the value of any of the columns described in Match Comparator Configuration Properties for Sun Master Index (Repository).
Save and close the file.
The following table lists and describes the Configuration Editor fields used to define the comparison functions. It also lists the corresponding column in the match configuration file if you want to modify the file directly.
Configuration Editor Field |
Match Configuration File Element and Column Number |
Description |
---|---|---|
match-type (column 1) |
A value that indicates to the Sun Match Engine how each field should be weighted. Each field included in the match string (the MatchingConfig section of the Match Field file) must have a match type corresponding to a match type defined in this file. |
|
size (column 2) |
The number of characters on which matching is performed, beginning with the first character. For example, to match on only the first four characters in a 10-digit field, the value of this column should be “4”. |
|
null-field (column 3) |
An index that specifies how to calculate the total weight for null fields or fields that only contain spaces. You can specify any of the following values. The Configuration Editor value is given first, followed by the match configuration file value in parenthesis.
In the above descriptions, the agreement and disagreement weights are either specified in this file or calculated using a logarithmic formula based on the m and u-probabilities (depending on the probability type). |
|
function (column 4) |
The type of comparison to perform when weighting the field. For information about the available comparison functions, see Match Configuration Comparison Functions for Sun Match Engine (Repository), in Understanding the Sun Match Engine. |
|
agreement-weight (column 7) |
The matching weight to be assigned to a field given that the fields match between two records; that is, the maximum match weight for a field. This number can be between 0 and 100 and can have up to 16 decimal points. Only set this value if the Probability Type is set to use agreement and disagreement weights. |
|
disagreement-weight (column 8) |
The matching weight to be assigned to a field given that the fields do not match between two records; that is, the minimum match weight for a field. This number can be between 0 and -100 and can have up to 16 decimal points. Only set this value if the Probability Type is set to use agreement and disagreement weights. |
|
m-prob (column 5) |
The initial probability that the specified field in two records will match if the records match. The probability is a double value between 0 and 1, and can have up to 16 decimal points. Only set this value if the Probability Type is set to use probabilities. |
|
u-prob (column 6) |
The initial probability that the specified field in two records will match if the records do not match. The probability is a double value between 0 and 1, and can have up to 16 decimal points. Only set this value if the Probability Type is set to use probabilities. |
|
parameters (column 9) |
Parameters correspond to the comparison function specified in the Function field or column. Some comparison functions do not take any parameters and some take multiple parameters. For information about which functions take parameters and the parameters they take, see Match Configuration Comparison Functions for Sun Match Engine (Repository), in Understanding the Sun Match Engine. |