Alternative scoring of BooleanQuery

View: New views
2 Messages — Rating Filter:   Alert me  

Alternative scoring of BooleanQuery

by Klaus Malorny :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



Hi all,

sorry if this is FAQ or has been answered in the list earlier, but unfortunately
I did not find a decent way to search in the archive (maybe a job for Lucene ;-) )

For some reason, I had to split my document into multiple fields. For the
search, I create a query with two subqueries for the same term within each
field, combining it via a BooleanQuery/Occur.SHOULD. If a term happens to appear
in both fields, the score is added (and scaled, if disableCoord is false). In my
context this is not really what I want. I would prefer to have a simple
"maximum" function over the scores of the subqueries. Since I do not consider
myself an expert in the internal working of Lucene, is there an easy way to
achieve this or do I have to reimplement the whole BooleanQuery class?

Thanks for any advice.

Regards,
Klaus


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@...
For additional commands, e-mail: java-user-help@...


Re: Alternative scoring of BooleanQuery

by hossman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


: false). In my context this is not really what I want. I would prefer to have a
: simple "maximum" function over the scores of the subqueries. Since I do not
: consider myself an expert in the internal working of Lucene, is there an easy
: way to achieve this or do I have to reimplement the whole BooleanQuery class?

Try a DisjunctionMaxQuery with a tie breaker value of 0.0f




-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@...
For additional commands, e-mail: java-user-help@...