BitSet addClause(BooleanQuery bq, BitSet result) {
final BitSet rnd = sets[random.nextInt(sets.length)];
Query q = new ConstantScoreQuery(new Filter() {
@Override
public DocIdSet getDocIdSet(IndexReader reader) {
return new DocIdBitSet(rnd);
}
});
bq.add(q, BooleanClause.Occur.MUST);
if (validate) {
if (result==null) result = (BitSet)rnd.clone();