You could always construct a BooleanQuery with all the necessary sub-clauses on an as-needed basis. You can string the sub-clauses together in arbitrarily complex ways. Be particularly aware that you one of the clauses of a BooleanQuery may itself be a boolean query, so constructing something like 'a and (b or c)' is equivalent to (fast pseudo code with parameters and lotsa other stuff left out here)
BooleanQuery bqSub; bqSub.add("b", SHOULD); bqSub.add("c", SHOULD); BooleanQuery bqTop; bq.add(bqSub, MUST); bq.add("a", MUST); etc, etc, etc... Best Erick