<DIV>Hi,</DIV> <DIV>I'd like to use keyword collect to do my filtering but its behaviour confused me, please advise. I greatly appreciate your help.</DIV> <DIV> </DIV> <DIV>Problem 1:</DIV> <DIV> </DIV> <DIV>when</DIV><FONT size=2><FONT size=2> <DIV align=left>eventList : LinkedList(size == 5)</DIV> <DIV align=left>from collect( Event(text matches </FONT><FONT color=#008000 size=2>".*rule5.*"</FONT><FONT size=2> ))</DIV> <DIV align=left></DIV> <DIV align=left></FONT><B><FONT color=#960000 size=2>then</DIV></B></FONT><FONT size=2> <DIV>System.out.println(</FONT><FONT color=#008000 size=2>"rule5 is fired "</FONT><FONT size=2> + eventList.size());</FONT></DIV> <DIV><FONT size=2></FONT> </DIV> <DIV><FONT size=2>I still do not see any log msg after adding 5+ events. Is something wrong with my rule?</FONT></DIV> <DIV> </DIV> <DIV>Problem 2:</DIV> <DIV> </DIV> <DIV>when</DIV> <DIV>event: Event(text matches <FONT color=#008000
size=2>".*rule5.*"</FONT><FONT size=2> ))</FONT></DIV><FONT size=2><FONT size=2> <DIV align=left>eventList : LinkedList(size == 5)</DIV> <DIV align=left>from collect( Event(text == event.text)</FONT><FONT size=2></DIV> <DIV align=left></DIV> <DIV align=left></FONT><B><FONT color=#960000 size=2>then</DIV></B></FONT><FONT size=2> <DIV>System.out.println(</FONT><FONT color=#008000 size=2>"rule5 is fired "</FONT><FONT size=2> + eventList.size());</FONT></DIV></FONT> <DIV> </DIV> <DIV><FONT size=2>After adding 5 events, I see 5 log msg instead of one as I'd expect.</FONT></DIV> <DIV>If I add more events, I will see more log. How do I tell LHS to reset the count from 0.</DIV> <DIV>Basically, I want to take 1 event out of 5 similar events (suppressing filtering). So if there are 10 similar events, my RHS should activate 2 times, not 10 times.</DIV> <DIV> </DIV> <DIV>Thanks,</DIV> <DIV>-av</DIV> <DIV><FONT size=2> </DIV></FONT></FONT><p> 
<hr size=1>Ready for the edge of your seat?
<a href="http://us.rd.yahoo.com/evt=48220/*http://tv.yahoo.com/">Check out tonight's top picks</a> on Yahoo! TV.