BooleanQuery is used to combine other queries.
They can be combined using three BooleanClause.Occur parameters:
BooleanClause.Occur.MUST - The subquery must be matched.
BooleanClause.Occur.SHOULD - The subquery may not be matched, but will be scored more highly if it is. If there are no MUST...