On 07/12/2009, at 3:19 PM, Joe Baldwin wrote:

> Is it possible to build a complex expression using the ExpressionFactory that 
> includes groupings (or is this only accomplished using the 
> Expression.fromString() method)?
> 
> For example
> 
>       (exp1 OR exp2 OR exp3) AND (exp4 OR exp5 OR exp6)

Yes.

Expression a = ExpressionFactory.matchExp(....).orExp( ...).orExp(....);

Expression b = ExpressionFactory.matchExp(....).orExp( ...).orExp(....);

Expression result = a.orExp(b);

> I would expect this could be accomplished using a Map (as a group), but I 
> have found no mention of support for this in the docs I have read.
> 
> Thanks
> Joe
> 

with regards,
--

Lachlan Deck



Reply via email to