lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: lucene 1.4 booleanquery
Date Tue, 14 Oct 2008 19:14:29 GMT

: So, I put add a query in the "should" fashion, it will return all things
: matching that query, but they won't rank as high as required matches?

No ... individual clauses match and score the same regardless of wether 
they are "SHOULD" or "MUST" clauses, what changes is how the matching on 
those clauses affect the matching of the BooleanQuery that contains them.  
a MUST clause must match in order for the BOOleanQuery to mathc .. a 
SHOULD clause doesn't have to match, but if it does the score will be 
hire.

some slightly odd edge cases come up when you have no MUST clauses but 
multiple SHOULD clauses (or just one SHOULD clause) with MUST_NOT clauses 
-- but the best way to understand these is to try some various examples 
and look at the "Explanation" output for some docs that match (and some 
docs that don't match)




-Hoss


Mime
View raw message