Hah, I forgot that, thanks!

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: u...@thetaphi.de


> -----Original Message-----
> From: Chris Hostetter [mailto:hossman_luc...@fucit.org]
> Sent: Friday, September 17, 2010 7:21 PM
> To: java-user@lucene.apache.org
> Subject: RE: Unexpected Results - using should and must in boolean query
> 
> 
> : 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



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to