: If you have some MUST terms, but you also want to have at least one of a : list of other terms (like 5 SHOULD clauses), the trick is to separate both: : Create a BooleanQuery with 2 MUST clauses, one is your required TermQuery : and the second clause is itself a BooleanQuery with all the SHOULD clauses. : This ensures that at least one of the SHOULD terms is needed together with : the MUST term.
BooleanQuery.setMinimumNumberShouldMatch(1) has hte same effect on what is matched w/o requiring a nested BooleanQuery -- and because of the coord factor the scores from the single BooleanQuery will probably better represent your goal then using the nested BooleanQueries. -Hoss -- http://lucenerevolution.org/ ... October 7-8, Boston http://bit.ly/stump-hoss ... Stump The Chump! --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org