[rules-dev] soundslike: report on phonetic matching
jschmied
nabble at juergenschmied.de
Fri Oct 15 12:11:26 EDT 2010
Hi!
I would put the creation of the key into a getter of my dataobject like:
class MyObject {
public String getMatchingKey() {
return doubleMetahone(myValue);
}
}
then insert this object into the working memory. You can write then your
rules like:
$a : MyObject ()
$b: MyObject(MatchingKey == $a.MatchingKey)
Drools calls the getMatchingKey only once and caches the result!
You can hide any kind of processing in a getter. As example I've done many
Date/Time processing like this.
juergen
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/soundslike-report-on-phonetic-matching-tp1707485p1709303.html
Sent from the Drools - Dev mailing list archive at Nabble.com.
More information about the rules-dev
mailing list