If (re)writing the rules to replace String "==" and "!=" with a custom op<br>for String eq and ne is an option, then it's simple to provide this operator.<br><br>The link is <a href="http://members.inode.at/w.laun/drools/CustomOperatorHowTo.html">http://members.inode.at/w.laun/drools/CustomOperatorHowTo.html</a><br>
<br>-W<br><br><div class="gmail_quote">2010/11/4 Michael Anstis <span dir="ltr"><<a href="mailto:michael.anstis@gmail.com">michael.anstis@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
You could look at using your own custom operator. <div><br></div><div>Wolfgang Laun linked to an article of his recently explaining the approach.<div><br></div><div>I'm not sure if custom operators however allow for indexing in the RETE network and therefore whether they're any faster than eval.</div>
<div><br></div><div>Wolfgang, Edson, can you advise in your experience?</div><div><br></div><div>Thanks,</div><div><br></div><div>Mike</div><div><div></div><div class="h5"><div><br><div class="gmail_quote">On 4 November 2010 16:04, H.C. <span dir="ltr"><<a href="mailto:canterburry@gmail.com" target="_blank">canterburry@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
We have a requirement to display data as stored (with the right casing) but<br>
for evaluation purposes strings should be compared case in-sensitive. We<br>
have several hundred rules touching these particular strings and would<br>
really like to avoid doing eval( x != null && x.equalsIngoreCase(y) )<br>
everywhere. Is there anywhere in drools that we could configure to make<br>
string matching case in-sensitive?<br>
<br>
Since we have to display the data with casing elsewhere, putting<br>
x.toLowerCase() in all our getter methods doesn't seem to be an option.<br>
<font color="#888888">--<br>
View this message in context: <a href="http://drools-java-rules-engine.46999.n3.nabble.com/case-in-sensitive-string-comparison-tp1842677p1842677.html" target="_blank">http://drools-java-rules-engine.46999.n3.nabble.com/case-in-sensitive-string-comparison-tp1842677p1842677.html</a><br>
Sent from the Drools - User mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</font></blockquote></div><br></div></div></div></div>
<br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br>