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.
_______________________________________________
rules-dev mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-dev

Reply via email to