Assuming that your criteria is not random and infinite you could
write a query that accepts the criteria you are searching by. Take a look
at section 6.6 of the user’s guide.
http://downloads.jboss.com/drools/docs/4.0.7.19894.GA/html/index.html
I’m fairly new to Drools so I’m more book smart than
I am practical right now but hopefully this will point you in the right
direction.
Kris Keller
Fidelity Information Services
678-455-7184
From: rules-users-bounces@lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Evans, Jess
Sent: Friday, October 24, 2008 5:24 PM
To: rules-users@lists.jboss.org
Subject: [rules-users] returning random limited query results
I'm
trying to implement some suggestion functionality. Is there an efficient
way to query for X random facts matching some constraint (e.g. ten random
cheeses that cost less than 3 dollars)? I'd rather not generate the
complete list if there's a more clever way. Unfortunately, the
constraints are customer specific; otherwise, I'd just create sort of a
central buffer list and dole out the random goodness to all takers.
thanks,
-Jess