lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Scoring a query with OR's
Date Thu, 20 Mar 2008 00:08:20 GMT

: I emailed a question earlier about the difference between OR and AND in a
: Boolean query. So in what I am trying to do, I need AND to behave like an OR (
: or what I like to call "soft AND"), and I need OR to behave like a logic OR,
: meaning that I don't want to reward documents that have more of the OR
: operands. It is easy for me to fix the AND, but is there a straightforward way
: of fixing the OR?

Assuming I understand you correctly, i think the DisjunctionMaxQuery will 
do what you want in your "OR" case if you set the tiebreaker value to 0.0f 
... then the score of hte final query will consist solely of the score of 
the highest scoring clause.

You may also need to change the coord function of your Similarity, ... off 
the top of my head i'm not certain.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message