-
Notifications
You must be signed in to change notification settings - Fork 12
Multiple rule config #330
Comments
Hi @debashissinha, You can do what you want by adjusting the matching weights and the merging threshold. If you set, for example, a weight for each of the properties (fname, lname and gender) to be 5, and set your merging threshold to be 10, that will allow all of your rules to be enforced as described. i) fname match (5 points) + lname match (5 points) + gender no match (0 points) = 10 points, so merge Smart Mastering doesn't have an 'if, then, else' style of execution but instead relies on the MarkLogic search capabilities to run its matching process as a single query per record. Also, please note that the capabilities of smart-mastering-core have been moved into the MarkLogic Data Hub, which is where all new enhancements will be taking place. So any future questions or enhancement requests for Smart Mastering can be made on the Data Hub github project. |
Hi @aajacobs |
In the proposed solution above I found that it is possible that while performing match it might happen that two or three such element may match whose summation is equivalent to score of a rule but the element considered in rule and the ones that matched are not same . E.g It is possible in the above match that in my options.xml I have the following weightages city (weight = 3) So it might be possible that rule 1 which states that fname ,lname match and when there is no gender match will give a total score of 10 . But it doesn`t satisfies rule that is fname , lname , gender nothing matches but instead city country and zip matches . In this case also the cumulative score is 10 and rule one got satisfied whereas the element matched were different . So rule 1 got satisfied but for a entirely different field values . Can you suggest some way to avoid this . Thanks & Regards |
Hi @ryanjdew ,
I Ryan I have a scenario which I need some insight from you . How do we configure multiple rules in options.xml to be executed on a set of document .
Lets say we have three field json consisting of in two document and we intend to match them
a) fName
b) lName
c) gender
The rule that we intend to apply is
i) fname and lname should match gender may not match
ii) fname matches but lname doesn't matches and gender gain matches.
iii) fname doesnt match but lname and gender matches.
My question here is if rule 1 doesn't matches then rule 2 will execute . if rule 2 doesn't match rule three will execute and give a result . If none matches we get unmatched .Is there any way to achieve this .Please if you can provide some documentation or example will help a lot .
Thanks & Regards
Debashis Sinha
The text was updated successfully, but these errors were encountered: